Skip to content

format

typescript
UIComponent.uiFaceCamera

class: UIComponent

description

Whether to face the camera when the uiMode is CanvasMode.Scene.

parameter

param_nametypedescription

reture

typedescription
booleanWhether to face the camera.

code example

typescript
let go = new GameObject("ui");
let uiComponent = go.AddComponent<UIComponent>(UIComponent);
uiComponent.guiPrefab = Resources.Load<GUIPrefab>(GUIPrefab, "<UUID>");//<UUID>- is the uuid of the ui file

uiComponent.uiFaceCamera = true;