TextStudio3DDropdown
[AddComponentMenu("Text Studio/Spatial UI/3D Dropdown")]public sealed class TextStudio3DDropdown : TextStudio3DControlCombines a selected 3D option label with a reusable list panel that can be opened and closed.
Methods
Section titled “Methods”
SetLabels(params string[])
Section titled “SetLabels(params string[])”public void SetLabels(params string[] labels)Replaces all dropdown items with defensive option snapshots created from the supplied labels.
Parameters
| Name | Type |
|---|---|
labels |
System.String[] |
Open()
Section titled “Open()”public void Open()Shows the configured option panel, synchronizes its list, and raises the open-state event once.
Close()
Section titled “Close()”public void Close()Hides the configured option panel and raises the open-state event once.
ToggleOpen()
Section titled “ToggleOpen()”public void ToggleOpen()Switches between the open and closed option-panel states.
Select(int, bool)
Section titled “Select(int, bool)”public bool Select(int index, bool notify)Selects an interactable item by index, updates the list and label, and optionally raises selection events.
Parameters
| Name | Type |
|---|---|
index |
System.Int32 |
notify |
System.Boolean |
Returns
System.Boolean: True when the selected index changed.
RefreshLabel()
Section titled “RefreshLabel()”protected override void RefreshLabel()Allows a subclass to derive its displayed label from current semantic state.
PerformActivation()
Section titled “PerformActivation()”protected override void PerformActivation()Applies the subclass’s semantic activation after common interactability checks.
Constructors
Section titled “Constructors”
TextStudio3DDropdown()
Section titled “TextStudio3DDropdown()”public TextStudio3DDropdown()Properties
Section titled “Properties”
public TextStudio3DOption[] Items { get; set; }Returns
TextStudio.ThreeD.TextStudio3DOption[]
ItemCount
Section titled “ItemCount”public int ItemCount { get; }Returns
System.Int32
SelectedIndex
Section titled “SelectedIndex”public int SelectedIndex { get; set; }Returns
System.Int32
SelectedItem
Section titled “SelectedItem”public TextStudio3DOption SelectedItem { get; }Returns
TextStudio.ThreeD.TextStudio3DOption
SelectedOption
Section titled “SelectedOption”public string SelectedOption { get; }Returns
System.String
IsOpen
Section titled “IsOpen”public bool IsOpen { get; }Returns
System.Boolean
OnOpenChanged
Section titled “OnOpenChanged”public UnityEvent<bool> OnOpenChanged { get; }Returns
UnityEngine.Events.UnityEvent{System.Boolean}
OnSelectionChanged
Section titled “OnSelectionChanged”public UnityEvent<int> OnSelectionChanged { get; }Returns
UnityEngine.Events.UnityEvent{System.Int32}
OnItemChanged
Section titled “OnItemChanged”public TextStudio3DOptionEvent OnItemChanged { get; }Returns
TextStudio.ThreeD.TextStudio3DOptionEvent
OnOptionChanged
Section titled “OnOptionChanged”public UnityEvent<string> OnOptionChanged { get; }Returns
UnityEngine.Events.UnityEvent{System.String}