UniTextDropdown
Single-selection dropdown with UniText captions and prefab-authored list, item, and outside-click templates.
Nested Types
public RectTransform Template{ get; set }Gets or sets the inactive list template, containing a Canvas, CanvasGroup, raycaster, and item template.
public UniText CaptionText{ get; set }Gets or sets the optional text displaying the selected caption.
public Image CaptionImage{ get; set }Gets or sets the optional image displaying the selected sprite.
public UniTextDropdown.DropdownEvent OnValueChanged{ get }Gets the event invoked once when selection changes through Value or user input.
Changes selection and refreshes its presentation without invoking OnValueChanged.
public void AddOptions(List<UniTextDropdown.OptionData> additions)Appends options and refreshes the presentation.
public void AddOptions(List<string> additions)Appends text-only options and refreshes the presentation.
public virtual void OnPointerClick(PointerEventData eventData)protected virtual Button CreateBlocker(Canvas rootCanvas)Instantiates the configured blocker under the root canvas, immediately below the list's sorting order.
protected virtual void DestroyBlocker(GameObject instance)Disposes of an inactive blocker instance after its close listener is removed.
protected virtual GameObject CreateDropdownList(GameObject source)Creates an inactive copy of the list template with its component references preserved.
protected virtual void DestroyDropdownList(GameObject instance)Disposes of the inactive list and its remaining children.
protected virtual UniTextDropdownItem CreateItem(UniTextDropdownItem source)Creates an inactive item with the template's component references preserved.
protected virtual void DestroyItem(UniTextDropdownItem item)Releases an unbound item; the default leaves its destruction to the enclosing list.
