







![]() |
ClockStone Audio Toolkit for Unity - Documentation |
AudioObject..::..SwitchAudioSources Method |
AudioObject Class Example See Also Send Feedback |
![]() |
Switches the primary and secondary audio source
Namespace: (Default Namespace)
Assembly: AudioToolkit (in AudioToolkit.dll) Version: 8.0.0.0 (8.0.0.0)
Syntax
C# |
---|
public void SwitchAudioSources() |
Remarks
This way a single AudioObject can play two audio clips at the same time.
You can use it e.g. to cross fade between two audios using the same AudioObject.
Examples
playingAudioObject.FadeOut( 3 );
playingAudioObject.SwitchAudioSources();
playingAudioObject.PlayNow( "otherAudioID" );
playingAudioObject.FadeIn( 3 );