Dont destroy on load results in new scene with all deleted objects c#
i have a game manager in my scene and im using
void Awake () { DontDestroyOnLoad(transform.gameObject); }
in a script thats attached to the game manager nothing else is in this script. my manager has a script on it with nothing but static variables. when i change scenes i get the following in my hierarchy
if i pause the scene i can see my character spawned in the right location all stats set to what they where changed int he last scene so im at a complete loss as to why this is happening my frames drop to lik 8fps and the profiler says
any help on this would be great cause im at a loss ....
Is the new scene an empty scene? Does your game manager reference any of those stuff?
Answer by Wtyson · Oct 02, 2015 at 08:45 AM
welp i just solved the issue while replying to this i for got to set my bool i have set for loading levels back to false which resulted in the deleted objects cause the level was repeatedly reloading over and over since its on a update . guess ill make function for that and call the function instead ^^ .. thanks
Your answer
Follow this Question
Related Questions
Basic question about Unity functionality 0 Answers
How to stop Particles when player is idle 0 Answers
Text object used in script gets deleted in inspector when running the game. (Gifs inside question) 0 Answers
Change hierarchy | remove any assets in remote addressable 0 Answers
Preventing name duplication in Hierarchy(getting selected GameObject) 1 Answer