Skip to content

format

typescript
RectTransform.right

class: RectTransform

description

The distance between the right edge of the transformation matrix and the right edge of the parent, relative to the parent.

parameter

param_nametypedescription

reture

typedescription
numberThe distance relative to the parent's right edge.

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