Does Studio Bank Loader override the overall FMOD integration settings?

I’m referring to this:

https://www.fmod.com/docs/2.02/unity/game-components.html#studio-bank-loader

How is this expected to interact with having Settings set to load ALL banks, or if I set Import Type = Streaming Assets and Load Banks = Specified?

Does the overall Settings override this as a superset? Like if I have it set to load “SFX.bank” banks and the Studio Bank Loader doesn’t specify this but specifies a “Music.bank”, do BOTH get loaded on project play? (Assuming load condition is met.)

Banks are loaded when something attempts to load them, unless they’re loaded already; and they’re unloaded when something attempts to unload them, unless they’re unloaded already. Whether that something is the overall integration settings or a Studio Bank Loader is irrelevant.

This means that if you set the overall intergration settings to load all banks when your game starts, it will, and you won’t be able to use Studio Bank Loaders to load any more banks unless you first use a Studio Bank Loader to unload some of those banks, in which case it will become possible to use a Studio Bank loader to load those banks again.

Yes, assuming that the integration settings specify that “SFX.bank” should be loaded when your game starts, and a Studio Bank Loader that is run when your game starts specifies that “Music.bank” should be loaded, both “SFX.bank” and “Music.bank” will be loaded when your game starts.

It would be unusual to use Studio Bank Loaders in this fashion, however, since if you need a bank to be loaded upon game start, it would be easier to include that bank in the integration settings’ list of banks to load upon game start. Studio Bank loaders are more commonly used for banks that need to be loaded and unloaded on the fly once your game is already running.

1 Like

Great clarity, thank you @joseph !

@joseph Here’s another subtlety: what if an event is assigned to multiple banks that are loaded? If it’s the same event, does FMOD know to not load it into memory several times? This is what I’d expect but having confirmation is of course appreciated.

Events are reference counted for this purpose. An event is loaded if at least one bank to which it is assigned is loaded, and is then unloaded only when all of the banks to which it is assigned are unloaded.

So, yes, FMOD does know not to load multiple copies of an event that’s included in multiple banks, and also knows not to unload an event included in an unloaded bank if the event is also included in a still-loaded bank.

1 Like

Thanks again, @joseph ! You word things so clearly. :metal: