Class: UITransformComponent
A UI rect around the entity's origin. The anchor is the origin's spot in the rect, from the bottom-left (y-up, Unity's pivot): (0, 0) bottom-left, (0.5, 0.5) centre, (0, 1) top-left. The rect spans [-anchorX·w, (1-anchorX)·w] × [-anchorY·h, (1-anchorY)·h] in local space.
Extends
Constructors
Constructor
ts
new UITransformComponent(
width?,
height?,
anchorX?,
anchorY?
): UITransformComponent;Parameters
| Parameter | Type | Default value |
|---|---|---|
width | number | 100 |
height | number | 100 |
anchorX | number | 0.5 |
anchorY | number | 0.5 |
Returns
UITransformComponent
Overrides
Properties
| Property | Modifier | Type | Default value | Inherited from |
|---|---|---|---|---|
anchorX | public | number | undefined | - |
anchorY | public | number | undefined | - |
dirty | public | boolean | true | Component.dirty |
enabled | public | boolean | true | Component.enabled |
height | public | number | undefined | - |
width | public | number | undefined | - |