Quantcast
Channel: Questions in topic: "dontdestroyonload"
Viewing all articles
Browse latest Browse all 416

Don't Destroy on Load return to scene Duplicate Music Object

$
0
0
I have a main menu scene and a options menu scene. I have a cube with no mesh rendered and an audio source with a 7 minute sound track that loops (the cube is in the main menu scene(first scene on start-up)). I have a script for the cube music player object that is do not destroy object on load when you switch to options menu. It works, when you switch to options menu, but when you switch back to main menu from options it creates another duplicate music playing cube so there is the don't destroy on load music cube that has been playing since beginning, and the new cube that restarts the track and now there are two versions playing. I need the same track that starts at the beginning when the game starts to keep playing when you switch to options menu and back to main menu, so that same track is always playing without duplicating or restarting. Please help, this bug is making me very distressed, as I and probably every other game developer have OCD and can not move on without fixing this. Thank you, Reece.

Viewing all articles
Browse latest Browse all 416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>