Game Manager loses reference to GUIText gameObject on a new scene
So, in my inspector in the first scene I simply assign the Text component to my GameManager and everything works well, but when I finish the level and load the next scene the reference is lost and it says "None (Text)". It's weird to me because other game objects dont lose references, only the game manager. I hope I explained myself and thanks a lot !
Post your Game$$anonymous$$anager's script so we can see whats wrong.
Answer by ClearRoseOfWar · Jan 08, 2016 at 06:31 PM
I think this is what you're looking for: http://docs.unity3d.com/ScriptReference/Object.DontDestroyOnLoad.html
maybe save the string before level load, and when the level loads, restore string to your GUI element?
I'm sorry, I don't really understand what you mean.Can you explain a bit more?btw thanks so much!
Your answer
Follow this Question
Related Questions
My collectable objects don't respond like they should after calling a coroutine for the first time? 0 Answers
Project gets changed upon entering play mode 0 Answers
How can i open txt file outside the unity editor. When i have already finshed the game. 1 Answer
FPS in editor becomes too high after upgrading Unity version. 2 Answers