Someone please help me!
I have a strange issue with the getParameters function in FMOD (Last Version (today october 1st 2014)) and unity 4!
Using the example CAR ENGINE for get parameters in online PDF, I did the same as the script was there.
IF I use a bank with no parameters, just PlayOneShot, it works fine. BUT Parameters dont make any sound. Here’s my code example:
using UnityEngine;
using System.Collections;
using FMOD.Studio;
public class SomCarro : MonoBehaviour {
FMOD.Studio.EventInstance engine;
private FMOD.Studio.ParameterInstance engineRPM;
public float contador;
// Use this for initialization
void Start () {
contador = 0; // the counter to increment a value, just for test;
engine = FMOD_StudioSystem.instance.GetEvent ("event:/Vehicles/Car Engine");
engine.getParameter ("RPM", out engineRPM);
engine.start ();
}
// Update is called once per frame
void Update () {
contador = contador+100;
engineRPM.setValue(contador);
if (contador > 6000){
contador = 0;
}
}
void OnDisable(){
engine.stop (FMOD.Studio.STOP_MODE.IMMEDIATE);
engine.release ();
}
}