- Home /
Destroy Duplicates
I have a gameobject set to not destroy on load. Works fine, no problems, except that when I return to the scene where it was originally created, the scene creates a duplicate. Thus, there are now 2. How can I fix this? The gameobject in question is the theme music, so having 2 creates really weird sound effects.
Answer by Fr0sZ · Jun 21, 2011 at 08:13 PM
You can either
have a scene with just that gameobject and go to the next scene.
Or check if the gameobject exixst and if it do dont create a new one
I ended up using the first option, as I wanted to make a splash screen anyway. Thanks!
Your answer
Follow this Question
Related Questions
DontDestroyOnLoad duplication 1 Answer
DontDestroyOnLoad Slowing Loading Down 0 Answers
Persistent GameObject Between scene Without Serilization 1 Answer
restricting clone number 2 Answers