SUIDropdown
Index
Functions Index
Properties Index
Functions
RefreshShownValue
void RefreshShownValue ()
Refreshes the text and image (if available) of the currently selected option.If you have modified the list of options, you should call this method afterwards to ensure that the visual state of the dropdown corresponds to the updated options.
AddOptions
Add multiple options to the options of the Dropdown.
ClearOptions
void ClearOptions ()
Clear the list of options in the Dropdown.
Show
void Show ()
Show the dropdown list.
Hide
void Hide ()
Hide the dropdown list.
OnValueChanged
void OnValueChanged (Closure callback)
Bind a function to handle the event that is invoked when when a user has clicked one of the options in the dropdown list.
SetValueByText
bool SetValueByText (string text)
Attempts to set the dropdown to the first option in the dropdown list that matches the inputted text. Returns true if found, false if no matches found.
Properties
Interactable
bool Interactable get
set
Is this UIDropdown interactable?
Template
The Rect Transform of the template for the dropdown list.
CaptionText
The Text component to hold the text of the currently selected option.
CaptionImage
The Image component to hold the image of the currently selected option.
ItemText
The Text component to hold the text of the item.
ItemImage
The Image component to hold the image of the item.
OptionsAsText
string[] OptionsAsText get
The list of possible options. (Text)
OptionsAsSprites
The list of possible options. (Sprites)
Value
int Value get
set
The Value is the index number of the current selection in the Dropdown. 0 is the first option in the Dropdown, 1 is the second, and so on.
NormalColor
Property Description
HighlightedColor
Property Description
PressedColor
Property Description
DisabledColor
Property Description
ColorMultiplier
float ColorMultiplier get
set
Property Description
GameObject
Property Description
Last updated
Was this helpful?