Table of Contents

UIToolkitDropdownHelper Class

public static class UIToolkitDropdownHelper
Inheritance
UIToolkitDropdownHelper

Remarks

NOTE: Enum value MUST start from 0 and increment by 1.

Methods

GetChoices<TEnum>()
GetIndexOrMinusOne(DropdownField, string, StringComparison)
GetValueFromEvent<T>(ChangeEvent<string>)
Initialize<T>(DropdownField, int)
Initialize<T>(DropdownField, string?)

Initialize .choices and then set value without notify.

Initialize<T>(DropdownField, T)
RegisterCallbackAsEnum<T>(VisualElement, Action<EventBase, T, object?>, bool)
RegisterCallbackAsEnum<T, TState>(VisualElement, Action<EventBase, T, TState>, TState, bool)

Register change event as enum value. Note that callback delay is required if callback initiates GUI value update or layout animation.