format
typescript
UIComponent.eventCameraclass: UIComponent
description
处理UI事件的相机。
UI事件,比如鼠标点击、触摸等,需要与一个相机进行交互。该属性就是用来指定处理这些事件的相机的。
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
Camera |
code example
typescript
let go = new GameObject("ui");
let uiComponent = go.AddComponent<UIComponent>(UIComponent);
uiComponent.guiPrefab = Resources.Load<GUIPrefab>(GUIPrefab, "<UUID>");//<UUID>-为ui文件的uuid
uiComponent.eventCamera;