RuntimeManager.HasLoadBank() with AssetReference

It seems like RuntimeManager’s property loadedBanks use AssetReference’s guid as dictionary’s key. So we can’t check hasLoadBank() with bank’s name.
Are there any better way to check loaded by bank’s name?

Hi,

The hasBankLoaded() function uses strings to check if the bank has loaded.

FMODUnity.RuntimeManager.HasBankLoaded("bank:/ Master"); 

I will link the Unity Integration | Scripting API which has other useful functions. Is this what you were looking for?

:cry: Sorry,nope.
RuntimeManager.HasBankLoaded can’t use bank’s name when the bank loaded by AssetReference.
It should be like this :

FMODUnity.RuntimeManager.HasBankLoaded( "92184a9598bd7b94ca45541e643b0bd3" );

or

FMODUnity.RuntimeManager.HasBankLoaded( bankAssetReference.AssetGUID );

It will be a problem when I want to check a bank’s load status: I should add a bank AssetReference property for every script which want to check the bank’s load status. Or I should remenber the GUID of it. So pain for me :cry:

I use LoadBank(TextAsset) now, it can check by bank’s name.

Hi,

Apologies, I missed the AssetReference.

Using AssetReferences will change the names of the banks in the FMOD system. They will have the same names as the text files in the FMOD Banks folder inside Unity e.g. “Master” or “Master.strings”. So to check if a bank has loaded using its name pass in the same names as your files.

FMODUnity.RuntimeManager.HasBankLoaded("Master");

Apologies again.