I started learning Unity not long ago and got stuck with this beginner problem. Appreciate any help
So, I’ve created a canvas with a GameOverScreen which has a few buttons and a background. This screen appears after the player loses. I also have a GameManager with DontDestroyOnLoad
that has a reference to the GameOverScreen and should set it active.The problem is that i don’t know how to set GameOverScreen active after the ResetLevel event, the GameManager loses all references, which is logical. But how then can I set active the GameOverScreen?
I also tried doing this with FindObjectOfType
, but it does not find objects that are not active.
So i’d be grateful if you could tell me how to do that properly.
dSilence is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.