Search code examples
c#audiounity-game-enginemute

How do I Mute The Audio In Unity 3D?


with script this. what is wrong in script this ?

audio.mute = ToggleButton.isSpeakerOff;

sorry bad english,fast answer please correct my script please


Solution

  • Simply google it, the following is from: http://answers.unity3d.com/questions/52109/how-do-i-mute-all-audio-sound.html

    AudioListener.pause = true;

    AudioListener.volume = 0;

    try this http://unity3d.com/support/documentation/ScriptReference/AudioListener-pause.html