格式
typescript
Control.Hide()所属类: Control
描述
隐藏控件。
被隐藏控件不会渲染在屏幕上,也无法响应交互事件。
参数
| 参数名 | 类型 | 描述 |
|---|
返回值
| 类型 | 描述 |
|---|---|
void |
代码示例
typeScript
let go = new GameObject("ui");
let uiComponent = go.AddComponent<UIComponent>(UIComponent);
let canvas = uiComponent.canvas;
let button = canvas.FindChild(Button,"Button");
button.Hide();