jrhee
New Member
Posts: 7
Posts: 7
|
Post by jrhee on Sept 30, 2014 11:34:37 GMT
I'd like to fade in a longer, ambient sound effect. I considered using playlists for this, but wanted to stick with sound groups to have the ambience volume controlled by the master mixer volume.
My code looks something like this:
SetGroupVolume(name, 0f); PlaySoundAndForget (name, 1f); FadeSoundGroupToVolume(name, targetVolume, someDuration); I'm noticing though that when the fade duration is lower than INNER_LOOP_CHECK_INTERVAL, SetGroupVolume is called instead of fading. This would be fine, but with the code above, the sound winds up not being audible at all.
I noticed though that when I move the volume slider in the UI for the sound group, the sound becomes audible. Is there something I need to call in my script to force the sound variation to pick up on the group volume change?
Thanks!
|
|
|
Post by DarkTonic Dev on Sept 30, 2014 13:15:37 GMT
What was your target volume? I'll need that information before I would have a useful answer. And also, what did the Group volume show as in the Inspector after that code ran?
|
|
jrhee
New Member
Posts: 7
Posts: 7
|
Post by jrhee on Sept 30, 2014 15:24:58 GMT
Target volume is being passed in as a parameter but for my test it was set to 1. Group volume shows as 1 in the inspector.
|
|
|
Post by DarkTonic Dev on Sept 30, 2014 15:40:03 GMT
Thanks, I've reproduce the bug and fixed it. It will be live in the next version.
|
|