format
typescript
Dropdown.AddOptions(value)class: Dropdown
description
Add an option to the dropdown list.
parameter
| param_name | type | description |
|---|---|---|
| value | string | The value of the option. |
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.AddOptions("Option 1");