S
S
Sergey Klykov2016-05-05 10:54:20
Unity
Sergey Klykov, 2016-05-05 10:54:20

How to turn off the sound in all scenes with one button?

How to turn off the sound in all scenes with one button?
Well, to press this button and the sound turned off in all scenes.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Daniil Basmanov, 2016-05-05
@DEMIGODDD

There are several options: turn off all AudioSource , pull AudioMixer , or turn off all AudioListener .
The first is done with the help of some kind of audio manager that stores all sources in itself and can mute them on command using AudioSource.mute or AudioSource.volume .
The second option can be implemented by tweaking the parameters or transitioning between snapshots. I would suggest reading the manual first .
The third option is done through AudioListener.pause , it will probably be the easiest, set the static variable to false and that's it. True, then the sound will cut off abruptly, perhaps you do not need it.

D
DrJarold, 2016-05-17
@DrJarold

Create one manager-sington, which you initialize on the initial scene, then it's a matter of technique, you play all the sounds through it, well, the control will also rest on it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question