Skip to content

format

typescript
RectTransform.localRotation

class: RectTransform

description

The local rotation of the RectTransform relative to its parent container.

parameter

param_nametypedescription

reture

typedescription
Vector2The local rotation of the RectTransform relative to its parent container.

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