DontDestroyOnLoad - Cancelling it

Hi
Did a search, but came up with nothing helpful.

I’m using DontDestroyOnLoad to keep music playing between scenes. However, if the player goes to the Game Scene, I want this music to stop. I’d rather the music end (or fade out) before the load, rather than carry it over to the game scene and destroying it there. (Have a lot loading into the game scene already)

Any advice on how to do this?

Thanks!

Just use the Stop, Play, Pause functions of the AudioSource. That way if the player is able to go back to the menu systems (e.g. if they die in game), then you just have to Play the music again rather than recreate the object you destroyed.

For fading etc check out iTween on the Asset Store.