- Home /
When I reload my scene, why does nothing work? dontDestroyOnLoad
When I reload my scene or leave it and go back to it, nothing works. Player cant move, objects wont spawn etc.
I think it has something to do with a dontDestroyOnLoad gameObject that gets created when I run the game. I don't actually know what this object is doing, but I think it is part of a 2D light pack I am using.
How can I prevent this from breaking everything? I just simply want to reload the current scene and have everything start from the beginning. I dont have any Static variables and I only have a menu and game scene. Menu just has a start and quit.
Sorry if this is a simple answer that I should know. I am quite new.
How should we be able to help you when we have literally 0 code to check?
Answer by Ermiq · Mar 11, 2021 at 08:54 PM
Find the DontDestroyOnLoad(
entries in the scripts used in the project and comment them.
Your answer
Follow this Question
Related Questions
How to reload a scene to it's original state? 0 Answers
Is there a way to activate a timer from another scene? 1 Answer
how to create a scene in c# WITH a specific gameobject? 0 Answers
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); is working badly 1 Answer
I want to access objects in my scene with a prefab when it spawns. 1 Answer