Answers for "stop all sounds playing unity"

C#
2

stop sound in unity

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

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