format
typescript
Dropdown.RemoveOptions(value)class: Dropdown
description
Remove the option at the specified index (index starts from 0) from the dropdown list.
parameter
| param_name | type | description |
|---|---|---|
| value | number | The index value. |
reture
| type | description |
|---|---|
void |
code example
typeScript
let go = new GameObject("ui");
let uiComponent = go.AddComponent<UIComponent>(UIComponent);
let canvas = uiComponent.canvas;
let dropDown = canvas.FindChild("DropDown");
dropDown.RemoveOptions(0);