O'Reilly logo

Unity 3D Game Development by Example by Ryan Henson Creighton

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

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

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