Answered
0
0

Hi every one
Excuse me for my english!

Well. I’m using 2 scripts. in the first scritp (audio) I have “EventInstace” and “parameterInstance”, this lines is working perfect in this script but, I need change the parameter in other script (collider)…. the question is.. How I do that?

FIRST SCRIPT

public class audio : MonoBehaviour {

[FMODUnity.EventRef]
public string Eventomusica = "event:/musica";
public FMOD.Studio.EventInstance Audiomusica;
public FMOD.Studio.ParameterInstance ParamMusica;

void Start () {
    Audiomusica = FMODUnity.RuntimeManager.CreateInstance(Eventomusica);
    Audiomusica.getParameter("musica", out ParamMusica);
    Audiomusica.start();
}

// Update is called once per frame
void Update () {

}

}

SECOND SCRIPT

public class Colision : MonoBehaviour {

void Start () {

}

// Update is called once per frame
void Update () {

}

void OnTriggerEnter(Collider other)
{
    Parammusica.setValue(1.0);
}

}

  • You must to post comments
Best Answer
1
0

Have a look at the StudioParameterTrigger script, included with the integration, it takes in a StudioEventEmitter object and modifies a parameter.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.