Timers & Clocks – Unity Asset Review & Tutorial
Timers & Clocks is an Unity Asset available on the asset store. As you might have figured it out from the asset name, this asset is a timer and a clock 🙂
Some time ago I had to make a timer for a small game. It supposed to count down from minute 5, display the timer but also send an event when the timer reaches 0. As some of you know I am a big fan of FlowCanvas and I thought to myself “Well, I will just use the Wait node“.
Looks decent enough. Only that the Timer is in seconds… I want to display the timer as Minutes & Seconds and then I got bored and I thought to myself (Yet again) “This seems something pretty basic but useful at the same time, maybe someone created an asset on the Unity Asset Store“.
Read More Below
The asset itself comes with three demo scenes showcasing the 3 main features of the asset.
– Clock Demo ; showcasing an actual analog clock with a pivot for the second, minute and hour hand’s.
– Timer Demo ; showcasing a digital clock. I would call this the “bread & butter” of the whole asset as the timer script is the thing I will focus on.
– uGUI Clock Demo ; showcasing a digital clock & an analog clock using uGUI elements.
First of all I do recommend you to check out the manual. I uploaded it here. Just keep in mind that the manual itself might update in the future.
To our left we can see the Timer script itself. Let’s go real fast over it.
We have a Timer State that shows : Enabled / Disabled . Let’s say that you have a couple of timers like this set up. You can keep them in the Disabled state and only Enable them when you need them to do something.
The timer type shows: Count Down, Count Up, Count Up Infinite.
Then we have the Start Time or the End Time (depending on what you chose above).
Then we get a couple of “Format Options”. How you want the timer to look. Do you want to show the Miliseconds, seconds, etc.
Count Down and Count Up also have some extra options like the “Times Up Settings”. You can set the Timescale to zero meaning that your whole game will “Pause” but what’s more important is that you can trigger various events. I was able to trigger a PlayMaker event and a FlowCanvas event. Basically this is the classic unity Event() system… you can trigger anything you want.
You also have a setting to “Destroy On Finish”. That one is an array where you can drag & drop GameObjects from the scene.
Load Scene On shows 3 options. Disabled, Times Up and Specific Time. Basically here you can name a scene that will be loaded. One thing that I would like is a couple of more options. The ability to load multiple scenes and/or load them Async. I should email the dev 😀
And the last option that we have is the “Timer Text”. Here you can specify an UI Text Field that will be updated by the Timer script.
And… that’s about it. I could show you the Analog Clocks but as I have said, they are straight forward & you actually have prefabs for those so you can just drag & drop then into your scene and change the look of them (if you want)… and bam you have an actual analog clock.
So thank you for reading this! I hope this was useful to you. You can email me if you have suggestions!