format
typescript
UIComponent.uiFaceCameraclass: UIComponent
description
Whether to face the camera when the uiMode is CanvasMode.Scene.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
boolean | Whether 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;