Sound Effects

Fading In

float length = 1f;
USoundManager.defaultBGMSource.FadeIn(length);

Fading Out

float length = 1f;
USoundManager.defaultBGMSource.FadeOut(length);

Crossfading Audio Clips

Ensure the sound source is already playing an audio clip before trying to crossfade.

AudioClip newClip = USoundManager.GetAudioClip("some song");
float length = 1f;
USoundManager.defaultBGMSource.Crossfade(newClip, length);

Last updated