Mute all sounds in Unity

I have a problem with FMODUnity.RuntimeManager.MuteAllEvents().

I want to mute all sounds on Master Bus “bus:/” and it should work straight away I think. There are no errors in Unity console, no warnings etc.
FMODUnity.RuntimeManager.PlayOneShot() works perfectly. Controlling custom parameters from Unity works great.

Are there any special things to consider while using MuteAllEvents()?

I’ve searched on various sites for solution but found nothing :frowning:

Thanks for any help!

FMOD Studio 1.09.02
Unity 5.5.1f1

I also tried this based on

string masterBusString = “bus:/”;
FMOD.Studio.Bus masterBus;

masterBus = FMODUnity.RuntimeManager.GetBus(masterBusString);
masterBus.setVolume(float); - works great
masterBus.setPause(bool); - works great
masterBus.setMute(bool); - doesn’t work at all…

So workaround for now is to use masterBus.setVolume(0.0f)/masterBus.setVolume(1.0f) to simulate mute/unmute or just masterBus.setPause(true/false).

The question remains - why setMute() does not work?

Hm, I can’t tell you the problem with the method MuteAllEvents, but I’m using

Bus musicBus = FMODUnity.RuntimeManager.GetBus("bus:/Music");

That works really well. So You could create a masterbus which is the parent of all other buses and just mute that one :slight_smile:

1 Like

Oh just saw your edit… strange setMute does work for me.
Unity 5.6.0p2
Fmod 1.09.04

Another workaround, thanks! It works indeed :slight_smile:

MuteAllEvents should take a bool parameter for pausing and unpausing.

In the RuntimeManager.cs you can see what MuteAllEvents does:

public static void MuteAllEvents(bool muted)

Yes, I know this, but it doesn’t work for me as described above. Thanks for your answer anyway :slight_smile:

I know this is old, but if the problem is only in Unity Editor, then it is caused by RuntimeManager Update function, which calls MuteAllEvents(UnityEditor.EditorUtility.audioMasterMute);

So to mute sounds in Unity Editor, you need to do sth like this:

UnityEditor.EditorUtility.audioMasterMute = true;