Click or drag to resize
FadingAudioSourceFade Method (AudioClip, AudioClip, Single)
If the audio source is enabled and playing, fades out the current clip and fades in the specified intro clip, after. If the audio source is enabled and not playing, fades in the specified intro clip immediately. If the audio source is not enabled, fades in the specified intro clip as soon as it gets enabled. After the intro clip has finished, starts looping the loop clip immediately, without fading.

Namespace: Slash.Unity.Common.Sound
Assembly: Slash.Unity.Common (in Slash.Unity.Common.dll) Version: 1.0.6018.40182
Syntax
public void Fade(
	AudioClip clip,
	AudioClip loopClip,
	float volume
)

Parameters

clip
Type: AudioClip
Clip to fade in.
loopClip
Type: AudioClip
Clip to loop after loopClip has finished playing.
volume
Type: SystemSingle
Volume to fade to and play both clips with.
See Also