I’m doing a little project at home to try and learn how to use unity and fmod. I’m having some difficulty finding a working example of what i’d like to do.
Basically i want to simply trigger a sound from a game object which exists in my level.
So far i’ve not really found anything that seems to be up to date, so i thought i’d ask on here I’m running unity 5.4 and fmod studio 1.08.09
I have a script i got from unity asset manager which handles the timing of playing the foot step samples fine, along with camera behaviour. It had some foot step audio triggers in there already which worked ok but it was just using the unity audio engine but i would like to learn how to use the fmod engine
The script i got essentially added an audio source to the fps controller and used that to define the world position.
It seems that you can’t really use studio event emitters in the same way. As falloff attenuation etc is handled within the event in fmod, it’s not as nessercary within fmod anyway.
My play sound script section for fmod is quite simple, as follows:
FSev = FMODUnity.RuntimeManager.CreateInstance(Footsteps); FSev.start();
At the top all i’m doing is declaring the event and there is nothing about world position.
When i run the game i get a message along the lines of you need to set 3d attributes as your sound is playing at world 0.
I’ve had a good old guess at what the syntax might be but i’m basically not sure what arguments i need, any declarations of objects from unity i need, how that would all get tied together in a unity script.
Any help anyone can provide would be greatly appreciated.