Back to API Reference
Class
UniTextDropdown
Inherits:Selectable
Implements:IPointerClickHandlerISubmitHandlerICancelHandler
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 Graphic Placeholder{ get; set }Gets or sets the graphic shown without a selection; assigning one permits Value to be -1.
public DropdownEvent OnValueChanged{ get }Gets the event invoked once when selection changes through Value or user input.
protected virtual GameObject CreateDropdownList()Creates an inactive copy of the list template with its component references preserved.
protected virtual UniTextDropdownItem CreateItem()Creates an inactive item with the template's component references preserved.
