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 – making an automatically scaling GUI texture

The logo of our marble game may fill the screen in the Game window, but it may not be big enough to cover the entire view area when it's running on fullscreen on OUYA. Fortunately, there's an easy trick you can apply to make your fullscreen textures automatically scale to the size of your screen, and it doesn't even require any code:

  1. In order to have an autoscaling texture, you need to remove all the Pixel Inset values from the Inspector window of the logo's GUITexture. Set the X, Y, W, and H values of Pixel Inset to 0.

  2. Your logo should now have no nonzero values besides the centered X and Y position values (at 0.5 each) and the Z scale (at 1). This is shown in the following screenshot:

  3. With these settings, your logo will disappear from your Game window, but we can make it show up again by editing the X and Y scale values.

  4. Change the X and Y scale values to 1.

Your logo should now perfectly fill the Game window, no matter how you size...