RobertK
Posts: 1
Joined: Sat Oct 30, 2021 7:42 am

Re: On/off button for all music in app

Turn audio on/off the music player audio source. Like this:

Code (csharp):

  1. var musicPlayer : AudioSource;
    2.
  2. function ToggleAudio () {
  3. if (musicPlayer.isPlaying)
  4. musicPlayer.Stop ();
  5. else
  6. musicPlayer.Play ();
  7. }
Maxhood95
Posts: 1
Joined: Fri May 06, 2022 3:11 am

Re: On/off button for all music in app

Please leave the play mode only once, I think it will work for the problem you are having

Return to “Issues”