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”
and
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 ()
{
//ERROR MESSAGE 1
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");
return;
}
boidActive.start();
}
void Update ()
{
//ERROR MESSAGE 2
filter.setValue = (this.transform.position.x);
Debug.Log(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!
cheers,
Simon