- Home /
Don't destroy on load problem
I made the player switch scenes with "Don't destroy on load" but every time i return to the starting scene there is one more player how to fix this
Answer by Bunny83 · Apr 24, 2020 at 01:42 PM
Just don't go back to the scene where it came from or don't use DontDestroyOnLoad at all. For the first case it's common to have a loading scene which you place before your first scene which just contains the player. You load that scene only once. Though it's quite unusual to keep active gameplay elements throughout multiple levels. It's more common to store relevant data in some kind of singleton and have each level contain the player prefab seperately.
Though if you really want to keep an object throughout several levels it should never be part of any of those levels. Either load it through an initial loading scene or load it dynamically if it doesn't exist yet.
Your answer
![](https://koobas.hobune.stream/wayback/20220612232345im_/https://answers.unity.com/themes/thub/images/avi.jpg)