Audio clips playing on new level load


I am with events playing when a level starts up, despite not having anything with Object Start/Object Disable. For instance, I have a death SFX for my player that is set to play ‘Object Destroy’ and while that works, it is also playing every time a new level loads. Any ideas on how to prevent this?

Does the player character object get destroyed when the previous scene is unloaded before the new scene is loaded in? This could be triggering the “Object Destroy” trigger condition.

You might want to look into recording a Live Update profiler session for when this happens and see if there’s anything in the recording that could provide some insight into what is happening.

Thank you for the quick response. Yes, it looks like a bunch of stuff is destroyed on level transitions. Is there a way to ignore this on level transitions or should I be managing the sounds manually? For Example, disabling all audio before I load the next scene and reenabling when I load a scene?

Unity doesn’t differentiate between an object destroyed on a scene unload and an object that’s destroyed manually through code, so there’s no way for FMOD to know the difference either.

You can either set up a character management system that prevents the character from being destroyed on a scene unloading, or you can just move this particular “On Destroy” event into a script that you pass a flag to know if the character has died or if the scene has been unloaded.