Class TMP_Dropdown
Inheritance
System.Object
    UnityEngine.EventSystems.UIBehaviour
    UnityEngine.UI.Selectable
    TMP_Dropdown
  Inherited Members
      UnityEngine.UI.Selectable.s_Selectables
    
    
      UnityEngine.UI.Selectable.s_SelectableCount
    
    
      UnityEngine.UI.Selectable.m_CurrentIndex
    
    
      UnityEngine.UI.Selectable.AllSelectablesNoAlloc(UnityEngine.UI.Selectable[])
    
    
      UnityEngine.UI.Selectable.OnCanvasGroupChanged()
    
    
      UnityEngine.UI.Selectable.IsInteractable()
    
    
      UnityEngine.UI.Selectable.OnDidApplyAnimationProperties()
    
    
      UnityEngine.UI.Selectable.OnEnable()
    
    
      UnityEngine.UI.Selectable.OnTransformParentChanged()
    
    
      UnityEngine.UI.Selectable.OnDisable()
    
    
      UnityEngine.UI.Selectable.OnValidate()
    
    
      UnityEngine.UI.Selectable.Reset()
    
    
      UnityEngine.UI.Selectable.InstantClearState()
    
    
      UnityEngine.UI.Selectable.DoStateTransition(UnityEngine.UI.Selectable.SelectionState, System.Boolean)
    
    
      UnityEngine.UI.Selectable.FindSelectable(UnityEngine.Vector3)
    
    
      UnityEngine.UI.Selectable.FindSelectableOnLeft()
    
    
      UnityEngine.UI.Selectable.FindSelectableOnRight()
    
    
      UnityEngine.UI.Selectable.FindSelectableOnUp()
    
    
      UnityEngine.UI.Selectable.FindSelectableOnDown()
    
    
      UnityEngine.UI.Selectable.OnMove(UnityEngine.EventSystems.AxisEventData)
    
    
      UnityEngine.UI.Selectable.IsHighlighted()
    
    
      UnityEngine.UI.Selectable.IsPressed()
    
    
      UnityEngine.UI.Selectable.OnPointerDown(UnityEngine.EventSystems.PointerEventData)
    
    
      UnityEngine.UI.Selectable.OnPointerUp(UnityEngine.EventSystems.PointerEventData)
    
    
      UnityEngine.UI.Selectable.OnPointerEnter(UnityEngine.EventSystems.PointerEventData)
    
    
      UnityEngine.UI.Selectable.OnPointerExit(UnityEngine.EventSystems.PointerEventData)
    
    
      UnityEngine.UI.Selectable.OnSelect(UnityEngine.EventSystems.BaseEventData)
    
    
      UnityEngine.UI.Selectable.OnDeselect(UnityEngine.EventSystems.BaseEventData)
    
    
      UnityEngine.UI.Selectable.Select()
    
    
      UnityEngine.UI.Selectable.allSelectablesArray
    
    
      UnityEngine.UI.Selectable.allSelectableCount
    
    
      UnityEngine.UI.Selectable.allSelectables
    
    
      UnityEngine.UI.Selectable.navigation
    
    
      UnityEngine.UI.Selectable.transition
    
    
      UnityEngine.UI.Selectable.colors
    
    
      UnityEngine.UI.Selectable.spriteState
    
    
      UnityEngine.UI.Selectable.animationTriggers
    
    
      UnityEngine.UI.Selectable.targetGraphic
    
    
      UnityEngine.UI.Selectable.interactable
    
    
      UnityEngine.UI.Selectable.image
    
    
      UnityEngine.UI.Selectable.animator
    
    
      UnityEngine.UI.Selectable.currentSelectionState
    
    
      UnityEngine.EventSystems.UIBehaviour.Start()
    
    
      UnityEngine.EventSystems.UIBehaviour.OnDestroy()
    
    
      UnityEngine.EventSystems.UIBehaviour.IsActive()
    
    
      UnityEngine.EventSystems.UIBehaviour.OnRectTransformDimensionsChange()
    
    
      UnityEngine.EventSystems.UIBehaviour.OnBeforeTransformParentChanged()
    
    
      UnityEngine.EventSystems.UIBehaviour.OnCanvasHierarchyChanged()
    
    
      UnityEngine.EventSystems.UIBehaviour.IsDestroyed()
    
  Namespace: TMPro
Syntax
[AddComponentMenu("UI/TMP Dropdown", 35)]
[RequireComponent(typeof(RectTransform))]
public class TMP_Dropdown : Selectable, IMoveHandler, IPointerDownHandler, IPointerUpHandler, IPointerEnterHandler, IPointerExitHandler, ISelectHandler, IDeselectHandler, IPointerClickHandler, ISubmitHandler, ICancelHandler, IEventSystemHandler
  Constructors
TMP_Dropdown()
Declaration
protected TMP_Dropdown()
  Properties
captionImage
Declaration
public Image captionImage { get; set; }
  Property Value
| Type | Description | 
|---|---|
| UnityEngine.UI.Image | 
captionText
Declaration
public TMP_Text captionText { get; set; }
  Property Value
| Type | Description | 
|---|---|
| TMP_Text | 
IsExpanded
Declaration
public bool IsExpanded { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
itemImage
Declaration
public Image itemImage { get; set; }
  Property Value
| Type | Description | 
|---|---|
| UnityEngine.UI.Image | 
itemText
Declaration
public TMP_Text itemText { get; set; }
  Property Value
| Type | Description | 
|---|---|
| TMP_Text | 
onValueChanged
Declaration
public TMP_Dropdown.DropdownEvent onValueChanged { get; set; }
  Property Value
| Type | Description | 
|---|---|
| TMP_Dropdown.DropdownEvent | 
options
Declaration
public List<TMP_Dropdown.OptionData> options { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.List<TMP_Dropdown.OptionData> | 
template
Declaration
public RectTransform template { get; set; }
  Property Value
| Type | Description | 
|---|---|
| RectTransform | 
value
Declaration
public int value { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
Methods
AddOptions(List<String>)
Declaration
public void AddOptions(List<string> options)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Collections.Generic.List<System.String> | options | 
AddOptions(List<TMP_Dropdown.OptionData>)
Declaration
public void AddOptions(List<TMP_Dropdown.OptionData> options)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Collections.Generic.List<TMP_Dropdown.OptionData> | options | 
AddOptions(List<Sprite>)
Declaration
public void AddOptions(List<Sprite> options)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Collections.Generic.List<Sprite> | options | 
Awake()
Declaration
protected override void Awake()
  Overrides
UnityEngine.UI.Selectable.Awake()
  
  
  
  ClearOptions()
Declaration
public void ClearOptions()
  CreateBlocker(Canvas)
Declaration
protected virtual GameObject CreateBlocker(Canvas rootCanvas)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Canvas | rootCanvas | 
Returns
| Type | Description | 
|---|---|
| GameObject | 
CreateDropdownList(GameObject)
Declaration
protected virtual GameObject CreateDropdownList(GameObject template)
  Parameters
| Type | Name | Description | 
|---|---|---|
| GameObject | template | 
Returns
| Type | Description | 
|---|---|
| GameObject | 
CreateItem(TMP_Dropdown.DropdownItem)
Declaration
protected virtual TMP_Dropdown.DropdownItem CreateItem(TMP_Dropdown.DropdownItem itemTemplate)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TMP_Dropdown.DropdownItem | itemTemplate | 
Returns
| Type | Description | 
|---|---|
| TMP_Dropdown.DropdownItem | 
DestroyBlocker(GameObject)
Declaration
protected virtual void DestroyBlocker(GameObject blocker)
  Parameters
| Type | Name | Description | 
|---|---|---|
| GameObject | blocker | 
DestroyDropdownList(GameObject)
Declaration
protected virtual void DestroyDropdownList(GameObject dropdownList)
  Parameters
| Type | Name | Description | 
|---|---|---|
| GameObject | dropdownList | 
DestroyItem(TMP_Dropdown.DropdownItem)
Declaration
protected virtual void DestroyItem(TMP_Dropdown.DropdownItem item)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TMP_Dropdown.DropdownItem | item | 
Hide()
Declaration
public void Hide()
  OnCancel(BaseEventData)
Declaration
public virtual void OnCancel(BaseEventData eventData)
  Parameters
| Type | Name | Description | 
|---|---|---|
| UnityEngine.EventSystems.BaseEventData | eventData | 
Implements
UnityEngine.EventSystems.ICancelHandler.OnCancel(UnityEngine.EventSystems.BaseEventData)
  
  
  
  OnPointerClick(PointerEventData)
Declaration
public virtual void OnPointerClick(PointerEventData eventData)
  Parameters
| Type | Name | Description | 
|---|---|---|
| UnityEngine.EventSystems.PointerEventData | eventData | 
Implements
UnityEngine.EventSystems.IPointerClickHandler.OnPointerClick(UnityEngine.EventSystems.PointerEventData)
  
  
  
  OnSubmit(BaseEventData)
Declaration
public virtual void OnSubmit(BaseEventData eventData)
  Parameters
| Type | Name | Description | 
|---|---|---|
| UnityEngine.EventSystems.BaseEventData | eventData | 
Implements
UnityEngine.EventSystems.ISubmitHandler.OnSubmit(UnityEngine.EventSystems.BaseEventData)
  
  
  
  RefreshShownValue()
Declaration
public void RefreshShownValue()
  Show()
Declaration
public void Show()