How to stop all application music playing in the background.
How to stop all application music playing in the background. I want to stop system music player sound
Answer by Ali-hatem · Mar 12, 2016 at 09:59 AM
On button click event I want stop all music playing in the background(other application running of background. like music player) from unity.
have you seen the link i posted AudioListener.pause = true;
is what you need because the scene have one AudioListener not Audiosource but if you want to deactivate game object that play sound you can use GameObject.SetActive(false)
.
I don't want to stop unity game object sound. i want stop other application sound which playing in background like playing music from music player.
GameObject.FindGameObjectWithTag("ObjectsShouldStop").GetComponent<AudioSource> ().Stop();
now all object that tagged "ObjectsShouldStop" will stop playing sound. & if this is not what you want i will still happy to help .
Your answer
Follow this Question
Related Questions
Where to find free background music? 11 Answers
How to stop the main music and play the GameOver music when a player dies? 2 Answers
c# sound in unity 5 1 Answer
How Do I Make A Rising Piano Death Noise? 1 Answer
Unity Sound Glitched up (in 2D) 0 Answers