Bank Load Testing

Hi all.

I am just simply wondering if there is a simple manner by which I can test and confirm if events are being loaded by a bank at runtime or in the Unity editor at all.

Currently what I have set up in my game Unity side are box colliders with an attached ‘Fmod Studio Bank Loader’ object on the collider, collider is set to ‘is trigger’. And the bank loader is told to play on trigger enter of the player and stop loading on trigger exit.

So on the Fmod side if I assign an event to this bank and say its a 2D sound like a music track, how can I confirm it is only loading with its appropriate bank and only when entering the collider and triggering that particular bank to ‘load’?

As in, if I play another box collider outside of the one containing the bank loader object, and the music is still calling there, is there something I’m doing wrong with the implementation?

Hi Jesse,

You can use the getLoadingState() function to get the loading state of the bank in question:

https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD_STUDIO_LOADING_STATE.html

If I’m understanding your last point correctly, FMOD will continue to play an event until it is implicitly or explicitly stopped even if its associated bank is unloaded. You can call for all events associated with that bank to stop when the bank is unloaded (trigger exit) with a combination of getEventList and a custom function that just calls all those events to stop.

https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD_Studio_Bank_GetEventList.html#/

Thanks,
Richard

Hi Jesse,

I was mistaken - the event continuing to play after a bank is unloaded is only true if the bank is loaded into memory (which is isn’t by default in the Unity integration).

https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD_Studio_Bank_Unload.html#/

Thanks,
Richard