I am unsure what the procedure is (if there is one/if it’s possible?) if I wanted to insert FMOD events in a script written in JavaScript.

I am comfortable with setting it up to work in scripts written in C# so at the top there is

public string eventName = “event:/pathtoevent”;
private FMOD.Studio.EventInstance eventNameRef;
private FMOD.Studio.ParameterInstance parameterNameRef;

and then in Start() you have
eventNameRef = FMODUnity.RuntimeManager.CreateInstance(“eventName”);

and then call these events at the appropriate time.

However how do you do this in JavaScript?

For example if the player controller script is in JS and every time they press jump a PlayOneShot event is triggered. Or if the up key is pressed then a footsteps event is triggered.

Having no luck so far :(

  • You must to post comments
Best Answer

It is very similar to c#, this should start you off.

public var fmodEvent : String;

A lot of Unity’s tutorials are available in both c# and Javascript:

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.