Hi,
I’m currently using FMOD banks as Addressables in Unity, and I’m encountering a memory usage issue.
Even when a bank contains only streamed events (no sample data), loading the bank causes the entire bank size to be loaded into memory. For example, I have a bank called BGM.streams.bank that is about 50 MB. Simply loading the bank via Addressables—without playing any events or explicitly loading sample data—results in the full 50 MB being loaded into memory.
For reference, I checked the memory usage using FMOD.Memory.GetStats()
.
The streamed events play correctly without any issues. However, compared to Unity’s built-in AudioClip streaming option, this results in significantly higher memory consumption, which is concerning for us, especially on memory-constrained platforms.
I’ve attached a snippet of the script I’m using. It loads/unloads banks via ScriptableObjects that hold AssetReferences, based on their use case. I would appreciate it if you could let me know whether there’s anything wrong with my approach, or if this is expected behavior with streamed FMOD banks.
Thanks in advance for your help!
Hi,
Thank you for the information and the code.
Could I please grab your FMOD studio and integration versions?
Thanks
Thank you for the information.
Unfortunately, I am not able to reproduce the issue.
Would it be possible to package your Studio project with the following settings:
and upload it to your
profile.
Would it also be possible to record a profiler session (FMOD Studio | Profiling) when loading the bank and share that as well with the following settings:
While waiting for a reply, I figured out the issue and wanted to share what I found.
I was following the Unity guide (https://fmod.com/docs/2.01/unity/user-guide.html#assetbundles-addressables) and used RuntimeManager.LoadBank
to load the bank. However, since it uses loadBankMemory
under the hood, even streaming banks were taking up their full size in memory.
As a workaround, I’m currently copying the bank file from Addressables to the file system and loading it using loadBankFile
.
This works, but it requires downloading the bank, copying it, and manually verifying its integrity.
Is there a better way to load banks that conserves memory?
1 Like
Thank you for sharing your solution.
Unfortunately not, that is the best alternative.