Answers for "stop all audio playing unity"

C#
7

stop sound in unity

audioSource.Play();//Start playing
audioSource.Stop();//Stop playing
Posted by: Guest on November-24-2020
1

unity stop all audio

// unity stop all sound by yasin
 private var allAudioSources : AudioSource[];
  
 function Awake() {
     allAudioSources = FindObjectsOfType(AudioSource) as AudioSource[];
 }
  
 function StopAllAudio() {
     for(var audioS : AudioSource in allAudioSources) {
         audioS.Stop();
     }
 }
Posted by: Guest on July-12-2021

C# Answers by Framework

Browse Popular Code Answers by Language