Skip to content

Component UI Transform

Berke edited this page Jun 23, 2026 · 1 revision

UITransform

The UITransform component controls layout, positioning, scaling, and rotation of UI elements in screen space.


Properties

isValid

ui.isValid

Returns whether the UITransform component is valid.

Returns

boolean

anchorMin

ui.anchorMin

Minimum anchor point of the UI element.

Type

Vector2

Example

ui.anchorMin = Vector2(0, 0)

anchorMax

ui.anchorMax

Maximum anchor point of the UI element.

Type

Vector2

pivot

ui.pivot

Pivot point used for rotation and scaling.

Type

Vector2

position

ui.position

Local UI position.

Type

Vector2

scale

ui.scale

UI scale factor.

Type

Vector2

rotation

ui.rotation

Rotation in degrees.

Type

number

Read-only Properties

resolvedPosition

ui.resolvedPosition

Final computed screen position after layout calculations.

Returns

Vector2

resolvedSize

ui.resolvedSize

Final computed size after layout calculations.

Returns

Vector2

Example Usage

local ui = entity.uiTransform

ui.anchorMin = Vector2(0, 0)
ui.anchorMax = Vector2(1, 1)
ui.position = Vector2(100, 200)

Clone this wiki locally