Skip to content

format

typescript
RectTransform.anchorMaxX

class: RectTransform

description

The maximum value of the X-axis coordinate of the anchor point of the RectTransform.

parameter

param_nametypedescription

reture

typedescription
number- The maximum value of the X-axis coordinate of the anchor point.

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.anchorMax.x;