Skip to content

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_nametypedescription
valuenumberThe index value.

reture

typedescription
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);