I have music in my game that I want to play across scenes so I have it attached to an object that’s DontDestroyOnLoad. This works for the first scene change but when it gets to the second scene change I get this warning and the music stops playing:
[FMOD] PlaybackSystem::onDestroyEvent : Destroying event instance '2007e0' due to event description {3a74cf85-b4c5-44d9-a404-b603a5bfac68} unload
UnityEngine.Debug:LogWarning (object)
FMODUnity.RuntimeUtils:DebugLogWarning (string) (at Assets/Plugins/FMOD/src/RuntimeUtils.cs:564)
FMODUnity.RuntimeManager:DEBUG_CALLBACK (FMOD.DEBUG_FLAGS,intptr,int,intptr,intptr) (at Assets/Plugins/FMOD/src/RuntimeManager.cs:95)
It appears to stop consistently after the second scene load regardless of which scene I start playtesting in.
Hi,
An event description unload is typically an indication that you’ve unloaded the bank that the event description belongs to. If you want an event instance to continue to play when changing scenes, then the banks containing the corresponding event descriptions must remain loaded.
A likely culprit for this would be if you have a Studio Bank Loader component in your first scene that is set to unload a specific bank, usually on “Object Destroy”, but it could also be triggered by any manual bank unload calls you’re making with Studio.Bank.unload()
.
So I did have unload set to “Object Destroy” but the object was set to “DontDestroyOnLoad” and was not manually destroyed. Setting unload to none fixed the issue which I guess makes sense as I won’t want to destroy it during playtime right now, but you never know what I’ll need to do in the future.
Still think this needs to be looked at but all working for me now. Thanks!
I’m happy to hear that you’ve got it working now.
I agree that having a bank unload on Object Destroy when the Object is set to DDOL is strange, but unfortunately I’ve been unable to reproduce the issue on my end. So that I can try to reproduce the issue, can I get you to provide your Unity and FMOD for Unity versions, and a stripped down version of the code you’re using to load a scene?