Is it possible to mute sound in editor in Unity? I mean not in the game, but in the editor, so that when I am debugging there would be no sound whatsoever.
1 Answer
In the Scene
view, you will find a little toggle, near the 2D
toggle, at the right of the lightning toggle (with a little sun icon).
Try to uncheck it to mute the sound in the scene.
Otherwise, in the Game window, you have a toggle called "Mute Audio", between "Maximize on play" and "Stats" toggles, just check it!
If you want this toggle to be turned on each time you start Unity, create a script called EditorAudioManager
and put the following script in it.
using UnityEditor;
[InitializeOnLoad]
public class EditorAudioManager
{
static EditorAudioManager()
{
EditorUtility.audioMasterMute = EditorPrefs.GetBool( "AudioMasterMute" );
}
[MenuItem( "Edit/Save editor audio preferences" )]
static void SaveEditorAudioPreferences()
{
EditorPrefs.SetBool( "AudioMasterMute", EditorUtility.audioMasterMute );
}
}
Then, make sure the "Mute Audio" toggle is on, and click on "Edit/Save editor audio preferences" so as to save the toggle state.
Other possibility :
Mute the sound of the Unity Editor from your computer using the volume mixer. On Windows 10, right click on the speaker icon in the bottom right corner of your screen and click on "Volume mixer".
-
\$\begingroup\$ The first solution does not work in my case. The volume button is not clickable. And second solution does not work because I have a mac. \$\endgroup\$ Commented Jan 16, 2018 at 15:53
-
\$\begingroup\$ Answer updated: just check the toggle "Mute Audio" in the Game window. \$\endgroup\$– HelliumCommented Jan 16, 2018 at 16:11
-
\$\begingroup\$ Is it possible to save the change? When I close the editor and open it again the sound is still there, even though I turned it off before closing. \$\endgroup\$ Commented Jan 17, 2018 at 16:56
-
\$\begingroup\$ @cutMeDown: I've created a small script to save the state of the toggle so that you don't need to turn the toggle on each time you start Unity. \$\endgroup\$– HelliumCommented Jan 17, 2018 at 17:25