Hey folks,
I’m trying to do a rather simple thing, but it isn’t working. All I want to do, is to change a parameter in FMOD to a specific value when a certain function gets called. This is what my code looks like:
public class PlayerMovement : MonoBehaviour
{
private FMOD.Studio.EventInstance P_Footstep;
private FMOD.Studio.ParameterInstance Wood;
void PlaySound (string path)
{
P_Footstep.setParameterValue("Wood", 1f);
FMODUnity.RuntimeManager.PlayOneShot(path, transform.position);
}
}
The “PlaySound” function gets called whenever a certain animation is triggered. So far the function is working properly and the sound is being triggered. But unfortunately the parameter does not change to the given value. Everything is set up correctly within FMOD itself, as manually changing the parameter is just doing fine, but somehow Unity does not pass the value on to FMOD.
What am I missing?