error: in FMOD_StudioSystem

Hey folks,

I’m want to change the value of an FMOD-Event but I keep getting the following error messages in Unity:

ERROR1 = “The name `FMOD_StudioSystem’ does not exist in the current context”
ERROR2 = “The left-hand side of an assignment must be a variable, a property or an indexer”

the code for that is the following:

private FMOD.Studio.EventInstance boidActive;
private FMOD.Studio.ParameterInstance filter; 

void Start ()
	boidActive = FMOD_StudioSystem.instance.GetEvent ("event:/boid_sound");

	if (boidActive.getParameter("filter", out filter) != FMOD.RESULT.OK)
		Debug.LogError("filter parameter not found on boid_sound event");


void Update () 
            //ERROR MESSAGE 2
            filter.setValue = (this.transform.position.x);

where “boid_sound” is the event in FMOD and “filter” is the parameter I want to control

Any help would be very much appreciated!


FMOD_StudioSystem isn’t the correct class to use, unless it is one you have made yourself.

FMODUnity.RuntimeManager.StudioSystem will give you a reference to the current Studio System, see our docs for more info:

The second issue is that setValue is a function and not a variable, so you would use it like this:

filter.setValue( transform.position.x );