Book Image

OUYA Game Development by Example

By : John Donovan
Book Image

OUYA Game Development by Example

By: John Donovan

Overview of this book

The OUYA console and development kit gives you the power to publish video games for the players, creating a console marketplace of the gamers, for the gamers, and by the gamers. Using the OUYA developer kit and the Unity3D game engine, even beginners with a captivating game idea can bring it to life with a hint of imagination. OUYA Game Development by Example uses a series of feature-based, step-by-step tutorials that teach beginners how to integrate essential elements into a game engine and then combine them to form a polished gaming experience.
Table of Contents (18 chapters)
OUYA Game Development by Example Beginner's Guide
About the Author
About the Reviewers

Time for action – creating a custom font with a text shader

You've already displayed text in your prototypes, but up until this point, we've been using the standard Arial font. However, you can display text in any Unity-compatible font using a Text Shader; the steps are as follows:

  1. Create a new material and select Text Shader from the GUI list in the Shader drop-down menu.

    A custom material with a Text Shader material attached to it has an area where you can input a texture in the Inspector window, as shown in the following screenshot:

  2. Add this texture to your asset list by importing a font file into your project and using the resulting font texture.

  3. Next, link the Text Shader material to a GUI Text object and make sure that it is displayed properly on the screen.

If you've configured the material and shader properly, you should be able to change the color of the displayed text in real time by changing the Text Color property of the material you created.

The following example shows a GUI Text...