Hi! Just set up FMOD in Unity from scratch for the first time. I love the workflow! I’m currently trying to pass through variables, but FMOD does not respond to variable changes. Am I doing something wrong with the following JS? All documentation is in C# so I distilled this example from the Angry Bots project, where it seems to work fine. The Awe parameter is found on the music event, the event is correctly set up in FMOD Studio (responds to changes of the awe parameter in the GUI if I change it manually) and the music is playing as it should.
#pragma strict
var awesomeMusic : FMOD.Studio.EventInstance;
var Awe : FMOD.Studio.ParameterInstance;
var aweParam: float;
function Start ()
{
awesomeMusic = FMOD_StudioSystem.instance.GetEvent("{longcodeyepyep-pastehere}");
if (awesomeMusic.getParameter(“Awe”, Awe) != FMOD.RESULT.OK)
{
Debug.LogError(“Awe parameter not found on music event”);
return;
}
Awe.setValue(0.0f);
}
function Update ()
{
if (Input.GetKeyDown ("="))
{
if(aweParam<1.0) aweParam=aweParam+0.05;
print ("Awe "+aweParam);
Awe.setValue(aweParam);
}
if (Input.GetKeyDown ("-"))
{
if(aweParam>0.0) aweParam=aweParam-0.05;
print ("Awe "+aweParam);
Awe.setValue(aweParam);
}
}