i am currently trying to implement spatialization, occlusion and reverb for FMOD event instances based on Steam Audio in Unity .
As the documentation suggests we can set up a gameobject with an FMOD “Studio Event Emitter” component and in order to make it work with Steam Audio we also add a “Steam Audio Source” component to the same gameobject. This works as expected: Spatialization is correct and also the environment influences the reverb of the sound.
However when using the same FMOD event and instantiating it through code, e.g. like this
FMODUnity.RuntimeManager.AttachInstanceToGameObject(fmodEventInstance, this.transform, this.GetComponent());
only spatialization seems to work. The environment does not have any influence on reverb. The only difference i see is that for instantiated events through code we have no means of adding the “Steam Audio Source” component. If that is the problem with reverb then what would i need to do code-wise in order to make an instantiated event work together with Steam Audio? If this is not the case then how does this work anyways? Or is there no way to have reverb on instantiated events, just on gameobjects with the “Studio Event Emitter” component on them?
If that is the case then it pretty much renders the usage of FMOD together with Steam Audio useless, since FMOD "Studio Event Emitters are so limited in use (as far as i understand there is more or less only play() and Stop()). For example while it is very convinient to use the AttachInstaceToGameObject and DetachInstanceFromGameObject to control where FMOD instances are played locally, achieving the same with gameobjects and “Studio Event Emitter” components on them is more or less impractical. Imagine i wanted a gun shot event to be played at the location of the gun and right after that i wanted to detach the sound from the gun since i did not want the tail sound to follow the gun. I would have to detach the gameobject from the gun gamobject, wait for the sound to finish and then destroy or reuse the gameobject / reattach it to the gun) In the meantime i would need to care for simultanious playing gun shots of the same gun (e.g. creating a new gameobject with “Studio Event Emitter” for every shot and attach it to the gun). So i really hope there is a way to use Steam Audio Reverb in conjunction with FMOD event instances created from code.
Thank you very much for your help!