 | FadingAudioSourceFade Method (AudioClip, Single, Boolean) |
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.SoundAssembly: Slash.Unity.Common (in Slash.Unity.Common.dll) Version: 1.0.6018.40182
Syntaxpublic void Fade(
AudioClip clip,
float volume,
bool loop
)
Public Sub Fade (
clip As AudioClip,
volume As Single,
loop As Boolean
)
public:
void Fade(
AudioClip^ clip,
float volume,
bool loop
)
member Fade :
clip : AudioClip *
volume : float32 *
loop : bool -> unit
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.
See Also