format
typescript
Control.Disable()class: Control
description
Disable the control.
The disabled control cannot respond to related interaction events.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
void |
code example
typeScript
let go = new GameObject("ui");
let uiComponent = go.AddComponent<UIComponent>(UIComponent);
let canvas = uiComponent.canvas;
let button = canvas.FindChild("Button");
button.Disable();