ClockStone Audio Toolkit for Unity - Documentation
AudioObjectSwitchAudioSources Method |
Switches the primary and secondary audio source
Namespace: (Default Namespace)
Assembly: AudioToolkit (in AudioToolkit.dll) Version: 8.2.0.0 (8.2.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 );
See Also