Changing Paremeters in Unity From Code

Hi!
I’m new with FMOD and I’m still working my way around the tool and I ran into a problem I haven’t be able to fix, Im trying to change my parameters with the StudioParameterTrigger from the code

The paramater is supposed to change the panning of my event

 if (GameObject.FindWithTag("Monster") == null)
 {
     spawnedMonster = Instantiate(monster, posicionElegida[posicionActual], Quaternion.identity);
     emitter = spawnedMonster.GetComponent<StudioEventEmitter>();
     paramTrigger = spawnedMonster.GetComponent<StudioParameterTrigger>();
 }

 paramTrigger.TriggerParameters();
 emitter.Play();

The game object has both the emitter and the parameter trigger assigned

image

but no matter from where or how I call the trigger parameters it just doesnt change

I have also tried emitter.SetParameter("Testing" -1f) and emitter.EventInstance.setParameterByName("Testing", -1f) both sound exactly as if the parameter value was 0 (default value)

The issue is with the ordering of these two lines of code. The Studio Event Emitter’s underlying event instance isn’t created until emitter.Play() is called, so in this case, the parameters that are being triggered aren’t applied because the event instance doesn’t exist yet. If you swap the order of the two, you should get the desired behavior.