Book Image

Unity3D UI Essentials

By : Simon Jackson
Book Image

Unity3D UI Essentials

By: Simon Jackson

Overview of this book

<p>Unity is a powerful cross-platform development engine that provides rich framework to create 2D and 3D apps or games. Through Unity3D, users are able take master the complexities of game development with ease, including animations, physics, renderings, shaders, scripting and now, Unity have released a new and advanced system to cope with the UI demands for modern applications and games.</p> <p>Unity 3D UI Essentials is a complete walk-through of the new UI system in Unity V4 and beyond (including Unity 5). This fast-paced practical tutorial provides you with in depth details of the new UI controls and layouts that can be used to create stunning and multiresolution UI.</p> <p>Venture forth into the highly componentized and advanced UI system, covering new features such as responsive designs and layouts. Also you get to deep-dive into the scripting side of the UI system as Unity has made the entire framework open source, giving free access to the source code of the new UI system to all developers.</p> <p>So get ready for a wild ride into the new Unity3D UI system and set your course for awesome!</p>
Table of Contents (14 chapters)

The Rect Transforms


The idea for the Rect Transforms started back in Unity 4.3 timescales with the introduction of the new Sprite system, they were exposed through the sprite editor when you were editing spritesheets, where you had a rectangular area to identify the area on the spritesheet where your sprite texture would come from. This was then used as the basis for drawing all sprites, you just didn't get to see it.

The Rect Tool

Seeing the need for more control over how sprites were drawn in the scene gave birth to a new manipulation control in the Unity editor called the Rect Tool, which took its rightful place in the main toolbar as shown here:

In its default mode, this tool allows visual scaling of a sprite as you can see here:

Tip

If you cannot see the blue control points, you likely need to scroll the view in. At low zoom levels the controls are not displayed around sprites/objects.

You get the four control points (one in each corner) to scale the sprite in or out from that point and the...