Skip to content

format

typescript
RectTransform.posY

class: RectTransform

description

The Y-axis coordinate value of the RectTransform.

parameter

param_nametypedescription

reture

typedescription
numberThe Y-axis coordinate value of the RectTransform.

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