In this recipe, we are going to create a score counter that displays the score as a number on the screen. To achieve this, we will use the Text (Script) component and create a script to handle it. Different functions will be available from this script, that will be called from other scripts to increase the score.
To rename an object, right-click on it and select Rename. Otherwise, we can change its name in the Inspector window.