Skip to Main Content
Learning 2D Game Development with Unity®: A Hands-On Guide to Game Creation
book

Learning 2D Game Development with Unity®: A Hands-On Guide to Game Creation

by Matthew Johnson, James A. Henley
December 2014
Beginner content levelBeginner
384 pages
11h 15m
English
Addison-Wesley Professional
Content preview from Learning 2D Game Development with Unity®: A Hands-On Guide to Game Creation

Rect Transform

The main component of the UGUI system is the Rect Transform. All other GameObjects have the basic Transform Component, but the Rect Transform works solely for the UGUI setup.

The Rect (short for rectangular) Transform is used to control the size and positioning of the UI elements in your Scene. Even in 3D space, all the UI elements are two-dimensional, so by using rectangular values for position and size, we can get a good idea of their look and placement. Figure 14.4 shows the Rect Transform for a Canvas GameObject.

Image

Figure 14.4 The Rect Transform with 2D position spacing

Note

By default, all UGUI components have a Rect Transform ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Game Development with MonoGame: Build a 2D Game Using Your Own Reusable and Performant Game Engine

Game Development with MonoGame: Build a 2D Game Using Your Own Reusable and Performant Game Engine

Louis Salin, Rami Morrar
Game Development Projects with Unreal Engine

Game Development Projects with Unreal Engine

Hammad Fozi, Gonçalo Marques, David Pereira, Devin Sherry

Publisher Resources

ISBN: 9780133523416Purchase book