Turn audio on/off the music player audio source. Like this:
Code (csharp):
- var musicPlayer : AudioSource;
2.- function ToggleAudio () {
- if (musicPlayer.isPlaying)
- musicPlayer.Stop ();
- else
- musicPlayer.Play ();
- }
Turn audio on/off the music player audio source. Like this:
Code (csharp):
- var musicPlayer : AudioSource;
2.- function ToggleAudio () {
- if (musicPlayer.isPlaying)
- musicPlayer.Stop ();
- else
- musicPlayer.Play ();
- }
sonnerie telephone: https://sonneriestelephone.com/
Please leave the play mode only once, I think it will work for the problem you are having