In this recipe, we are going to create a timer that displays time on the screen in minutes and seconds. The benefit of using a more precise timer is the ability to provide the player with a more precise indication of time. This is particularly helpful when there are moments during the game that can take up a considerable amount of time. Having time displayed in a familiar format also assists the player to easily recognize and respond to the amount of time remaining. We will use Text (Script) and develop a script to achieve this goal.
First of all, we need to create new UI text that will display our timer. Right-click on the Hierarchy panel and then navigate to UI | Text. Rename it to Well Formatted Timer.
We can change the Font and the Font Size values as we wish so that they can better suit our needs.
Next, we can adjust Color; for this example, we will set it to light gray, but feel free to use another color that better suits your design.
Now...