Answered
0
0

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. http://www.fmod.org/documentation/#content/generated/FMOD_Studio_Bus_SetFaderLevel.html

Thanks in advance guys.

  • You must to post comments
Best Answer
3
0

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.setFaderLevel(float);
 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!

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.