API reference
API reference
Select your platform
No SDKs available
No versions available

SimpleDropdownList Class

Extends MonoBehaviour
A dropdown ui interface that uses 'UnityEngine.Text' labels and builds content via a load method that accepts a list of strings.

Fields

string DropdownToggleUnselectedText[Get]
string [] Options[Get]
int SelectedOptionIndex[Get]
SimpleDropdownIndexEvent OnIndexSelected[Get]
SimpleDropdownOptionEvent OnOptionSelected[Get]

Properties

string SelectedOption[Get]
Whether the popup is currently showing or not

Protected Functions

On awake, find dropdown cell
Perform dropdown setup methods
Add toggle delegate
Remove toggle delegate
Load a specific cell
Parameters
index
Cell index
Returns
Height of cell

Member Functions

Load dropdown with specified options
Parameters
newOptions
The options to be used
Select an item in the dropdown list
Parameters
newIndex
The option index to be selected
Select option by name
Parameters
option
The option to be selected
A method for obtaining the index of a dropdown option string.
Parameters
option
Accepts an option text string that matches a loaded text option.
Returns
Returns the index of the provided option string
Show or hide the popup
Parameters
toShowing
The option index to be selected
Did you find this page helpful?
Thumbs up icon
Thumbs down icon