Currently, I’ve setup options in my game that allow me to tweak the sound, music, and voice volumes using SetVolume. Some of my tracks refuse to do this, as far as I can see there are no differences. I have ruled out it being scene based as I can switch to scenes with the tracks that work and the volume levels are consistent, but when I use one of the “trouble tracks”, where I’m changing a scene, or loading a scene where the assigned music plays, swapping one of these are will immediately disregard the bus changes.
I have tried to re-import, rebuild, rename, but for some reason there just aren’t working. I am not well versed in FMOD so I have not done any special alterations on specific tracks that might be in over my head.
You’ve mentioned using setVolume and Bus changes, but can I get you to describe exactly the extent of how you’re currently setting volume? i.e. using setVolume on individual Event Instances, specific Buses, or VCAs to affect multiple Buses, etc.
When you change/load a scene, are you making any changes to the FMOD System? For example, are you unloading/loading specific banks, setting parameters, etc.
Finally, can I get your FMOD for Unity and FMOD Studio versions?
Hi, thanks for responding! So, to be clear, my title screen plays the music there just fine. If I turn the volume down via my in game settings, the title screen music adheres, so if I turn it all the way down it will be not play. Now if I replace that with the “troubled track” it will not respond to the settings. It plays at the standard volume no matter what I do.
For the title music and the other track that works fine, it works between scene changes as well, including the volume settings, this is why it does not appear to be a code issue, as it persists even when isolated to a single screen, or any screen where the title music works if this makes sense.
That being said happy to share the code in question related to volume changes:
public FMOD.Studio.Bus busSfx;
public FMOD.Studio.Bus busMusic;
public FMOD.Studio.Bus busVoice;
public Slider musicSlider;
public Slider sfxSlider;
public Slider voiceSlider;
public float busVolumeSFX = .5f;
public float busVolumeMusic = .5f;
public float busVolumeVoice = .5f;
// Start is called before the first frame update
busSfx = FMODUnity.RuntimeManager.GetBus("bus:/Sounds");
busMusic = FMODUnity.RuntimeManager.GetBus("bus:/Music");
busVoice = FMODUnity.RuntimeManager.GetBus("bus:/VoiceActing");
// Update is called once per frame
public void MusicVolumeChange(float volume)
busVolumeMusic = volume;
FMOD Version 2.02.15 and Unity Version 2019.4.40f1
I did a little more digging, the tracks that don’t respond to the volume sliders seem to be related to royalty free music that I’m using as placeholders. Is there some kind of setting these files could have that prevent it working with FMOD? (My custom tracks all seem to respond…)
Sorry for the triple post here, but thought about it more and more, and created an instance of the event through code and then immediately set the volume to be what my settings/slider was set to and this worked.
If this wasn’t clear for the tracks in questions I was using the FMOD Studio Event Emitter component, any idea why this would behave this way only for specific tracks? It’s just that in this case while there’s a solution, testing every single game sound in fair that it may not be in line with the settings would be fairly daunting!
Based on the code snippet you’ve provided, using an FMOD Studio Emitter component shouldn’t make any difference to an event instance you’ve created yourself.
Correct me if I’m wrong and you’re handling this in some other script, but the code snippet you’ve provided doesn’t contain code for a change of volume for any bus other than the music bus - you only have MusicVolumeChange and not, for example, SFXVolumeChange. This would line up with the behavior you’ve described where your title screen music works correctly, but others do not.
If this is not the case, unfortunately I haven’t been able to reproduce the issue on my end - if possible, can I get you to upload your Unity and FMOD Studio projects, or stripped down versions of them where you can consistently reproduce the issue, to your FMOD User Profile for me to take a closer look at? Note that you’ll have to register a project with us to be able to upload to your profile.