Keeping score

Now we have the basic gameplay in, but the player doesn't know how well they're doing to do that, we will.

  1. Go to GameObject | UI | Text. Double-click on the Canvas object in order to see it and how the text looks compared to it.
  2. Then, select the Text object and then from the Anchors Presets menu, hold down Alt+Shift and select the top-center option by clicking on it. Change the name of the object to Score Text.
  3. Select the Score Text object and change the Rect Transform component's Height to 50. Under the Text component, change the Text property to 0 and change the Alignment to center horizontally. Then, change the Font Size to 40. I then changed the text color to a darker blue (If you want to use exactly what I did, you can click on ...

Get Unity 5: Learning C# by Developing Games now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.