Fmod events playing without any bank loaded

Hi. I am learning how to use Fmod banks in Unity. In my previous projects, I’ve only been using one single master bank, so this is the first time I have to optimize my banks loading/unloading.

So I have a prefab “AudioManager” with a StudioBankLoader component on it. This component loads the master bank on start and unload it on destroy. I have another prefab called “Player” on which I placed another StudioBankLoader component, loading the player bank on enable and unloading it on disable.
I noticed that when the player is disabled, the Fmod events associated with the bank are still playing. I tried to disable the player bank component before restarting the game, the player events are still playing. I tried to disable the audio manager bearing the master bank and then restart, and every events are still playing.

I am getting a bit confused and I guess I missed something pretty important on how fmod banks works. Does someone could explain to me what’s happening ?

Edit : Since I posted, I tried two things. First I checked the loading state of each banks using HasBankLoaded(), they are all loaded on start, as expected, but my player bank doesn’t unload on disable.

        public void OnDisable()
        {
            playerControls.Disable();
            
            //Stop Player Event
            playerFmodEvent.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
            playerFmodEventInstance.release();

            //Unload Player's Bank On Disable
            foreach (var Player in studioBankLoader.Banks)
            {
              RuntimeManager.UnloadBank(Player);
            }
        }

Second, I tried to mess with the Initialization settings from the fmod setting tab. I switched the “Load Banks” menu from All to None. There, when I hit play, there is no sound playing but the Console still tell me that the two banks are loaded, even if there is no sound playing and I get a whole bunch of error “FMOD event missing”.

Edit 2 : The player’s events stops onDisable thanks to the eventInstance.stop() and eventInstance.release() methods, but The Player bank is not unloaded as I wish it would be.

bump

Unloading a bank should automatically stop a playing event, and it will prevent any further samples from being loaded and prevent any further API calls to events from that bank from. This can lead to unexpected behaviour so it is preferable to stop all events currently playing before unloading.

If you’re experiencing some other behaviour, please try using Bank::getEventList, EventDescription::getInstanceList, and then EventInstance::stop() to ensure events have stopped before unloading.

I understand what I did wrong. I was building assets data and metadata into separate banks, and was only loading the metadata bank. So the problem was solved by either loading the asset data bank and the metadata bank at once, or by building a single bank containing the asset data and the metadata infos, in the build settings in fmod.