I made an energy system lately and it only starts regenerating and losing the energy when the Scene that has the Energy GameObject is opened.
I am wondering if there is any way for the timer to start if i lose a life in another scene. Because in this state if someone exits the game from a Level Scene and enters it after 2h and enters the Menu Scene with the Energy, only then will the energy be lost and start to recharge. I was thinking about the DontDestroyOnLoad but i dont think it works as its a UI GameObject