Skip to content

格式

typescript
UIComponent.uiPixelPerUnitY

所属类: UIComponent

描述

当前UI在Y轴方向上每个单位的像素数量。

参数

参数名类型描述

返回值

类型描述
number

代码示例

typescript
let go = new GameObject("ui");
let uiComponent = go.AddComponent<UIComponent>(UIComponent);
uiComponent.guiPrefab = Resources.Load<GUIPrefab>(GUIPrefab, "<UUID>");//<UUID>-为ui文件的uuid

uiComponent.uiPixelPerUnitY;