Not all parameter changes being sent to FMOD

Hello. I’m submitting this topic separately, as requested. For the project at hand, I’m using FMOD 2.02.05 and Unity 2021.3.2f1. This issue did not occur for me on another recent project, but that project also used different versions of FMOD and Unity. So, I’m wondering if my issue is a bug.

Anyway, the issue involves my music system. The music is three separate looped sections with lead-ins and Transition Timelines going into each, handled by a fair amount of Logic Tracks. To trigger the switch from one section to another, I have discrete global parameters set up that tell the track to go to the correct destination marker when the corresponding parameter changes from 0 to 1, after which other Logic Tracks take over to manage that section. The parameter immediately changed right back to 0 so that it doesn’t interfere with any of the other logic at that point. This system works great in FMOD, although, yes, I know there could be some better ways to set this up. This was a case where we had a tight deadline and the music system was being built alongside the game - not near the end of production.

In previous projects, I’ve been able to do this same thing by calling the parameter change from script like so:

void Awake()
FMODUnity.RuntimeManager.StudioSystem.setParameterByName(“EnterBossFight”, 1);


void Start()
    FMODUnity.RuntimeManager.StudioSystem.setParameterByName("EnterBossFight", 0);

Simple stuff. This time, however, this was only sometimes working. The parameter changes in FMOD would get stuck. Sometimes they would switch to 1, but then not back to 0. Sometimes they’d switch another parameter to 1 instead, and then the music would get stuck in a weird loop.

I tried every permutation of that code, removing words in case documentation wasn’t updated, adding a “.” in between Studio and System, triple-checking spellings and cases, getting other eyes on the problem, turning the parameter to Local and calling it the way suggested in the kartGame tutorial code, etc., and no matter what I did, the parameters kept getting stuck on or off (1 or 0). This same code (different parameter), however, was also working perfectly to call another parameter change which was a float value, and that never got stuck.

To close this out, I tried too many things to concisely mention here, so please ask me any relevant follow-up questions in case I missed something (I was reaaaaaally tired the day the project was due), or in case you would like additional info. I just want to be able to fix this in the next version of the game, and I want to be sure it doesn’t happen in future projects if I’m just not doing something right.

Thanks for your time!

As an update, I’m finding that the Studio Global Parameter Trigger doesn’t seem to be working in Unity either.

1 Like

I’m able to get the Studio Global Parameter Trigger to work with FMOD Studio 2.02 and Unity 2020.3. Can you provide some more information on what isn’t working? Are you seeing any errors in the console when you try to use it?

In regards to your question on setting global parameters, I’m not certain what could be happening. I am not able to replicate your issue - I have a global parameter that I set in Awake and then reset in Start but the end result is the value set in Start. Can you confirm that “Hold value during playback” is not enabled on the global parameter?

It will be worth recording a live update session and seeing if the setting parameter commands are firing correctly and in the right order.

Hello Richard. Thanks for the response. Did you test on Unity 2020.3 or 2021.3? I was using 2021.3.2f1.

I’ve been digging around in the project again, and more specifically, it seems that the global parameter changes aren’t working with regard to logic tracks. I can’t get a single one to work properly when trying to get a transition region to go to a destination marker in my music system. Each of these parameters are using discrete values if that helps.

Global parameters DO seem to be working in parameter sheets with continuous values that control volume automation.

There are no console errors, and I’ve also debugged the code to make sure that everything is passing into the correct functions, and it’s all working properly. It just doesn’t seem to be making the changes in the FMOD event.

I have also confirmed that “Hold value during playback” is not enabled.

Good call on recording the live update session. I’ll do that as soon as I get a chance. Thanks! But yea, please try it with the 2021 version of Unity if you haven’t already.

Have a good one! - Adam

I’ve tried again with Unity 2021.3 and FMOD Studio 2.01 and 2.02 with the same results. If you cannot see anything odd going on with the recorded live update session then would you be able to package this particular event into a new blank project and send it over for me to take a look at?