Game Development Reference
In-Depth Information
As you can see, it is quite different to the standard transform component we see on
normal GameObjects; however, it does have the same
Rotation
and
Scale
parameters
as the normal transform. Here's a quick breakdown of the new properties:
Note: The positioning values for the
Rect Transform
change based
on whether the anchors are in a fixed (non-stretched) or stretched
mode. For more details on anchoring, see
Chapter 4
,
Anchors Away
.
•
Pos X/Pos Y/Pos Z
(when in non-stretched mode): These identify the
X
,
Y
, and
Z
position of the
Pivot
of the
Rect Transform
before any scaling or rotation.
•
Width/Height
(when in non-stretched mode): These identify the width and
height of the
Rect Transform
area.
•
Left/Top/Right/Bottom
(when in stretched mode): These values replace the
above properties when the
Rect Transform
uses stretched Anchors; they
identify the offset positions of the Rect Transforms Pivot point from the
border of the parent
Rect Transform
.
•
Blueprint mode
: This changes the selection corners for the
Rect Transform
to an un-rotated and unscaled box. The base Rect selection area is identified
by the preceding parameters.
•
Raw mode
: By selecting this toggle, any changes to pivot or scale will not
also alter the position and size of the
Rect Transform
.
•
Anchors
: This controls the layout behavior of the
Rect Transform
; this will
be covered in more detail in
Chapter 4
,
Anchors Away
.
•
Pivot
: This designates the
pivot point
for the
Rect Transform
, this is where
the
Rect Transform
will rotate around.
The
Pivot
of a
Rect Transform
can only be edited for UI
components, not to be confused with a
Sprite
pivot point,
which is set in the
Sprite
import settings.
•
Anchor Point
(the graphic in the top-left hand corner): This is a graphical way
to alter the anchor points for the Rect Transform (see
Chapter 4
,
Anchors Away
).