This recipe teaches us how to use multiple Image (Script) components inside a script in order to create a symbolic lives counter. The number of lives are not displayed as a number, but with heart symbols on the screen. It is similar to the counter in the Implementing a lives counter recipe, but the logic to manage different icons is different.
To begin, let's create a new empty game object. To do this, right-click on the Canvas object, since we want it as parent, and then Create Empty. Finally, rename it as SymbolicLivesCounter.
Next, click on SymbolicLivesCounter and add a new image by selecting UI | Image, and then rename the object just created as Heart1.
Take a heart icon image, or create on our own, and import it in to our project. If our project is not set as 2D, remember to set the...