Never loaded any banks yet audio works

Hello. I’m testing FMOD in Unity and to my surprise playing one shots has worked even though I haven’t loaded any banks. Is this unusual or intended behaviour? I’m quite confused as I thought you had to load any bank you were to play from.

By default, FMOD for Unity will automatically load all banks when playing, or when the editor enters play mode. You can disable this, or only load specific banks, from the Initialization section of the plugin’s settings menu at FMOD → Edit Settings → Initialization.

If this is disabled, you will indeed have to load the desired banks at runtime - the plugin comes with the Studio Bank Loader component to do this, but you can also load them yourself from your own code using RuntimeManager.LoadBank().

Hello. Thank you for your response.

Is it recommended to disable the initialization setting for a large game? How much memory could you expect it to take up if we always have all banks loaded?

I’m not very aware in general how sounds interact with RAM during runtime. I assumed they would always be partially recalled from hard disk but I guess that would cause a lot of general latency.

Does loaded mean that all sounds in all events of the given bank are completely stored in RAM? Like if I have a 2 megabyte sound file as an asset used in an event, would I expect that to take up 2 megabytes of ram if its bank is loaded in? Or does loaded in mean something else?

Thank you for any explanations.

I can’t make any explicit recommendations as I’m unfamiliar with your game, but it will depend on the scale of your game and any memory limitations you may have. You can view the current and max memory consumption with the Debug Overlay included with FMOD for Unity. If you want to retrieve this information directly from the API, you can use Studio::System::getMemoryUsage, which when using the plugin you would call with FMODUnity.RuntimeManager.StudioSystem.getMemoryUsage().

On your point about how FMOD interacts with memory at runtime, I would first recommend reading over the Studio API Guide section on Bank Layout, and the subsequent sections about Bank Loading, Bank Unload, and Sample Data Loading. Let me know if you have any further questions after that.

1 Like

Thank you.