I have my music and sfx on two separate buses in fmod. I want to be able to have the player change the volume settings for these via the pause menu in my game. How would I go about scripting that (C#)?

In trying to solve my own problem I got as far as this link, but I don’t know how or where to put it in my script.

Thanks in advance guys.

  • You must to post comments
Best Answer

It is fairly easy, once you have a reference to the bus you can then adjust the fader level:

 string masterBusString = "Bus:/";
 FMOD.Studio.Bus masterBus;

 masterBus = FMODUnity.RuntimeManager.GetBus(masterBusString);
 masterBus.getFaderLevel(out float);

This fader level is relative to the fader level set in FMOD Studio.
Then it is up to as to how you want to expose/control it.

  • Jeanelle M

    Ah ok, that makes sense. Thanks!

  • David Hunter

    Thanks! This really helped me too!

  • Pablo Sorribes Bernhard

    Same here! I wonder why they don’t just put an example like this in the Documentation.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.