format
typescript
Control.Close()class: Control
description
Close the current control.
Equivalent to calling the setParent method and setting the parent object to nil.
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.Close();