Assigning group busses in Unity makes all audio silent

I assigned my sounds to group busses in order to have Master, Music, and SFX sliders, but for some reason when I assign these busses in my script, it makes all the audio stop working in my game. I have no idea what I’m doing wrong, I followed multiple tutorials and looked over my script multiple times and checked my build location and my event / bus names, etc.


I assume this is for a options menu.

How do you implement the slider with this script? Normally you use the on value changed event and add your script, then use one of your volume variables as a dynamic bool.

Would also be better to have the code contained in start moved to update otherwise if you make a change nothing will happen.

If you watch the video tutorial below by Scott he uses a function with a float parameter as the dynamic bool.
image

This is the tutorial I followed :slight_smile:

The code I posted was just to set the volume to 1 on start so that I could hear it playing before I implemented the settings menu functions. However, no matter what I set the value to, it seemed like just getting the references to the busses caused it to go silent. I tried taking out those references and the sounds worked again, but then if I moved one of the sliders (even with the empty reference) everything went silent again. I am curious if this is a glitch with FMOD. Any functions to do with any busses causes the sound to just disappear.

Okay! After some messing around I was able to figure out why it wasn’t working. Apparently I was not using the Dynamic float version of the OnValueChanged function of the sliders. On Start() I set each slider’s value to 1 which triggered the OnValueChanged function on each of them. The problem is since they weren’t the Dynamic float sliders, the value being passed in the parameter was always 0 which made it so the volume was 0 every time I started the game or moved any of the sliders. So make sure you set your sliders to Dynamic float!! :slight_smile:

I see you had put the Dynamic bool as your suggestion already. I had thought I’d done that but I must’ve saw the non dynamic version and my tired brain thought it was the dynamic one lol. My bad!

1 Like