O'Reilly logo

Unity 5.x Game Development Blueprints by John P. Doran

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required