|
Post by DarkTonic Dev on Apr 29, 2015 23:59:42 GMT
A Variation volume is calculated as:
Master Mixer Volume
times
Bus Volume (if any bus assigned to the Group)
times
Group Volume
times
Variation Volume
So if any of those values are zero, the result is zero volume, i.e. 1 x 1 x 0 x .5 = 0
Here's the right way to fade a sound in, by code.
var result = MasterAudio.PlaySound("Scream", 0f); // play sound at zero volume (for the Variation). if (result.ActingVariation != null) { result.ActingVariation.FadeToVolume(1f, 1f); // fade to full Variation volume over 1 second. }
Fade to volume is fading the Variation's volume only. If you set the group volume or bus volume to zero with code or in the UI, the volume will always be zero based on the calculation above.
Also, you can set up custom fade in and fade out time per Variation in the UI if you know it in advance.
|
|