format
typescript
Dropdown.valueclass: Dropdown
description
The index value of the currently selected option in the dropdown menu.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
number |
code example
typeScript
let go = new GameObject("ui");
let uiComponent = go.AddComponent<UIComponent>(UIComponent);
let canvas = uiComponent.canvas;
let dropDown = canvas.FindChild("DropDown");
dropDown.value;