Skip to content

format

typescript
RectTransform.width

class: RectTransform

description

The width of the matrix transformation.

parameter

param_nametypedescription

reture

typedescription
numberThe width of the matrix transformation.

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.width;