Creating the Lives Remaining UI components

In this section, we will add three images of the Cucumber Man's head beneath the health label and meter, each image representing a life remaining:

  1. Download the cmLives.png file from the publisher's website
  2. Drag that image into the Assets | Cucumber Man folder in the Project panel
  3. Select the imported image and, in the Inspector panel, change the Texture Type to Sprite (2D and UI)
  4. In the Hierarchy panel, right-click the HUD_Canvas and select UI | Image
  5. In the Inspector panel, click the small circle to the right of the setting under Image (Script) | Source Image
  6. Select the cmLives.png image you added in step 2
  7. In the Inspector panel, rename this image as Life1
  8. Click Rect Transform | Scale  and change ...

Get Getting Started with Unity 2018 - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.