FMOD Parameter to Unity

(miras) #1

Hello, i can’t solve this problem, i’ve made FMOD parameter “health” (range 0-100), how can i link it to Player’s Health in Unity, so when Player’s health drops below 30% it will trigger FMOD parameter “Health” with simple low filter cutoff.
I mean logically there is a way to create dialog between FMOD Health(0-100) parameter and Player Health in Unity(0-100), but how?

(Cameron Baron) #2

An example could be as basic as this:

 [FMODUnity.EventRef]    public string eventRef;
 FMOD.Studio.EventInstance instance;
 FMOD.Studio.ParameterInstance health;
 void Start ()
      instance = FMODUnity.RuntimeManager.CreateInstance(eventRef);
      instance.getParameter("health", out health);
 void Update ()