|
Post by tttlllrrr on Aug 1, 2020 8:17:22 GMT
Hello!
I am trying to create a script that I can call that will fade out a looping sound group... I can't seem to figure it out from the API and I was wondering if it would be possible to post an example that shows a full script doing such.
I want to call:
void DarkTonic.MasterAudio.SoundGroupVariation.FadeOutNow ( )
on a soundgroup called "desertsound"
Just using the default fade time is fine
thank you!
|
|
|
Post by DarkTonic Dev on Aug 1, 2020 18:19:44 GMT
It's the Variation in the Sound Group that's looping, not the Sound Group. Anyway, you have to play the sound first to get ahold of the particular Variation that's playing. I believe it's like this:
var result = MasterAudio.PlaySoundFollowTransform("desertsound", this.transform);
/// sometime later, fade it.
if (result.ActingVariation != null) { result.ActingVariation.FadeOutNow(); }
There's also an API method to fade ALL of the Variations in a Sound Group at the same time.
-Brian
|
|