format
typescript
RectTransform.leftclass: RectTransform
description
The distance between the left edge of the transformation matrix and the left edge of the parent, relative to the parent.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
number | The distance from the left edge of the parent. |
code example
typeScript
let go = new GameObject("ui");
let uiComponent = go.AddComponent<UIComponent>(UIComponent);
let canvas = uiComponent.canvas;
let button = canvas.FindChild("Button");
let rectTransform = button.rectTransform;
rectTransform.left;