Hello,
I am having some trouble with Application.LoadLevel() and DontDestroyOnLoad and was hoping someone could clear up the confusion. I have dont some looking around but it seems like what im seeing just doesnt seem right.
Right now, if I do not include DontDestroyOnLoad and reload the level via Applicaiton.LoadLevel, i get errors saying the game object doesnt exist anymore and it doesnt work. Its confusing because the game is actually running, but maybe there are things pointing to the old memory address, which doesnt exist anymore.
If I do include DontDestroyOnLoad and reload the level via Application.LoadLevel, objects end up getting recreated and I have no clue why.
From what I’ve seen, people use Singletons to get around this, but it just seems strange that for such a basic feature, I never see things like tutorials speaking about it. Am I to understand its better to allow something like a GameManager or GameController (call it what you will) to have a DontDestroyOnLoad and then allow that instantiate the objects at runtime? It just seems almost counter intuitive in some cases where you want to manually place something in your scene if it will always run into this issue.
From the sound of it, it seems like I just simply dont understand how these things work. I would really appreciate anyone being able to clear this up for me.
Thank you in advance