How to cache a PARAMETER_ID of a global parameter


I need to set a certain parameter every frame.
I assume that RuntimeManager.StudioSystem.setParameterByName() is less efficient than RuntimeManager.StudioSystem.setParameterByID()
Is that a correct assumption?

So how exactly can I get that id of a given parameter?

Thanks in advance :pray:


Correct, setParameterByID() is more efficient.

To get the id first we need to get the description of the parameter:

FMODUnity.RuntimeManager.StudioSystem.getParameterDescriptionByName("ParameterName", out FMOD.Studio.PARAMETER_DESCRIPTION parameterDescription);

The (FMOD Studio | Studio API) parameter description contains the id which you can access like so:

RuntimeManager.StudioSystem.setParameterByID(, newValue); 

Hope this helps!

1 Like

Exactly what I was asking, thanks a lot! :pray:

1 Like