I’m just getting started with FMOD and am wondering if it’s realistic to use it just for non-spatialized soundtrack elements, while also using the Unity spatializer / sound system for environmental sounds – including obstruction and occlusion etc.) The FMOD setup wizard does a good job encouraging one to bypass Unity audio, but is there a case to be made for using both?
Also, while I’ve seen examples of code to enable occlusion and obstruction with FMOD, I’m curious whether there’s any way to just get this to work automatically the way it does with the Unity sound system. I will learn to code if I have to but would rather just focus on setting up the sound environment.
I absolutely love FMOD for adaptive mixing of background music and soundscape so I’m hoping I can combine this with what I already know of the Unity sound system for diegetic sounds…
The “case” is entirely dependent on whatever best addresses your needs - we recommend disabling Unity audio to save on system resources, but FMOD and Unity audio can coexist without issue. The only exception to this is on Xbox One, where FMOD will fail to initialize if both systems are enabled.
There’s a couple of ways to do this, but unfortunately none of them are automatic, and will require you to do some coding. For your purposes, the simplest option would be to make use of Resonance plugins, and drive their occlusion by automating it with a parameter that is set from your own code. A basic rundown of this would be to place a Resonance Audio Source effect on an event, and a Resonance Audio Listener effect on the master bus. From there, you can automate the value of “Occlusion” on the Source effect with your own parameter, and set the value of the parameter based on your own raycasts in Unity.
Thanks very much, @Louis_FMOD – I appreciate the quick reply and the suggestions. Just to be clear, there’s nothing inherently naughty about attaching both an FMOD and a Unity audio listener to a player object, right? I’m not overly worried about resource usage at this time.