 | 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.SoundAssembly: Slash.Unity.Common (in Slash.Unity.Common.dll) Version: 1.0.6018.40182
Syntaxpublic void Fade(
AudioClip clip,
float volume,
bool loop,
float fadeSpeed
)
Public Sub Fade (
clip As AudioClip,
volume As Single,
loop As Boolean,
fadeSpeed As Single
)
public:
void Fade(
AudioClip^ clip,
float volume,
bool loop,
float fadeSpeed
)
member Fade :
clip : AudioClip *
volume : float32 *
loop : bool *
fadeSpeed : float32 -> 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. - fadeSpeed
- Type: SystemSingle
Speed to fade in or out with, in volume/second.
See Also