Click or drag to resize
FadingAudioSourceFade Method (AudioClip, Single, Boolean, Single)
If the audio source is enabled and playing, fades out the current clip and fades in the specified one, after. If the audio source is enabled and not playing, fades in the specified clip immediately. If the audio source is not enabled, fades in the specified clip as soon as it gets enabled.

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,
	float volume,
	bool loop,
	float fadeSpeed
)

Parameters

clip
Type: AudioClip
Clip to fade in.
volume
Type: SystemSingle
Volume to fade to.
loop
Type: SystemBoolean
Whether to loop the new clip, or not.
fadeSpeed
Type: SystemSingle
Speed to fade in or out with, in volume/second.
See Also