- Home /
Question by
chrishall · Jun 08, 2014 at 09:34 PM ·
timertimer countdownstatic-variables
How to have a Count Down Timer carry over to a new level?
Hi there I am currently creating a 2D game where you have to collect X amount of objects in X amount of time. I want to have a ten second timer as a GUI Label. But I don't want it to be restated when I change levels. So I want the timer let's say in the top right hand corner at all times counting down even when I change levels! Is this possible? Any help would be greatly appreciated!
Comment
Answer by applejuices · Jun 08, 2014 at 09:35 PM
Make it in a game object, and at start do, DontDestroyOnLoad.
TThats for carrying over timer.
Answer by NoseKills · Jun 08, 2014 at 09:36 PM
Declate the variable static or put it into a script on a GameObject that you declare DontDestroyOnLoad(yourGameObject);
Your answer
