I don’t know what I’m doing wrong, I’ve looked endlessly on the API and unity and still my FMOD params won’t even budge. What about this code is wrong?
public class FMODPlayer : MonoBehaviour
{
float VA = 0;
float VA2 = 1;
FMOD.Studio.EventInstance ambiance;
// Start is called before the first frame update
void Start()
{
blam = FMODUnity.RuntimeManager.CreateInstance("event:/SFX/rotation");
ambiance = FMODUnity.RuntimeManager.CreateInstance("event:/Ambience/Water");
ambiance.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(gameObject.transform));
blam.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(gameObject.transform));
ambiance.getParameterByName("VA", out VA);
ambiance.start();
/* ambiance.setParameterByName("VA", 0, false);*/
}
// Update is called once per frame
void Update()
{
if (Input.GetKey(KeyCode.Space))
{
FMOD.RESULT result = ambiance.setParameterByName("VA", VA2, false);
Debug.Log("Spaceyman");
Debug.Log(ambiance);
Debug.Log(result);
}
}
private void PlayParam()
{
}
}