format
typescript
RectTransform.worldMatrixclass: RectTransform
description
(Read-only) The world matrix of the RectTransform.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
Matrix4x4 | The world matrix. |
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.worldMatrix;