Time for action - create a font texture

First, let's create a custom font texture to display some GUIText showing the player how many times he's bounced the heart.

  1. Create a new GUIText object and call it Bounce Count. Follow the instructions in Chapter 7 for creating a GUIText object and mapping a font material to it. This time, I chose a font called "Cajun Boogie" because it's ridiculous.
  2. Change the font size in the Font Exporter. I chose 45 pt for the font I chose your mileage may vary.
  3. In the Inspector panel, set the Bounce Count transform position to X:0.9 Y:0.9 Z:0 to place it in the upper-right corner of the screen.
  4. Choose Anchor: Upper Right and Alignment: Right from the GUIText component settings in the Inspector panel.

Now we have a fun ...

Get Unity 3D Game Development by Example 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.