Rect Transform

class UI.RectTransform

A Unity engine Rect Transform for a UI object. See the Unity manual for more details.

position: Tuple

Position of the rectangles pivot point relative to the anchors.

Attribute:

Can be read or written

Return type:

Tuple

local_position: Tuple

Position of the rectangles pivot point relative to the anchors.

Attribute:

Can be read or written

Return type:

Tuple

size: Tuple

Width and height of the rectangle.

Attribute:

Can be read or written

Return type:

Tuple

upper_right: Tuple

Position of the rectangles upper right corner relative to the anchors.

Attribute:

Can be read or written

Return type:

Tuple

lower_left: Tuple

Position of the rectangles lower left corner relative to the anchors.

Attribute:

Can be read or written

Return type:

Tuple

anchor: Tuple

Set the minimum and maximum anchor points as a fraction of the size of the parent rectangle.

Attribute:

Write-only, cannot be read

Return type:

Tuple

anchor_max: Tuple

The anchor point for the lower left corner of the rectangle defined as a fraction of the size of the parent rectangle.

Attribute:

Can be read or written

Return type:

Tuple

anchor_min: Tuple

The anchor point for the upper right corner of the rectangle defined as a fraction of the size of the parent rectangle.

Attribute:

Can be read or written

Return type:

Tuple

pivot: Tuple

Location of the pivot point around which the rectangle rotates, defined as a fraction of the size of the rectangle itself.

Attribute:

Can be read or written

Return type:

Tuple

rotation: Tuple

Rotation, as a quaternion, of the object around its pivot point.

Attribute:

Can be read or written

Return type:

Tuple

scale: Tuple

Scale factor applied to the object in the x, y and z dimensions.

Attribute:

Can be read or written

Return type:

Tuple