The upper-right corner of our game's interface and canvas, will contain the scoring information. This section demonstrates how to create the necessary UI components:
- Right-click the HUD_Canvas GameObject in the Hierarchy panel and select UI | Text. We will use this text object for our score label.
- Rename the text component as Score_Label.
- In the Inspector panel, change the Text value of the Text (Script) component to Score.
- In the Text (Script) component, make the following changes or select other settings as you wish. You can experiment with the game in game mode to see how this will look during the game:
- Font Style: Bold
- Font Size: 16
- Color: Dark Blue
- Either in the Inspector panel or in Scene view, ...