Skip to content

TextStudio3DDropdown

ClassTextStudio.ThreeDTextStudio.3D
[AddComponentMenu("Text Studio/Spatial UI/3D Dropdown")]
public sealed class TextStudio3DDropdown : TextStudio3DControl

Combines a selected 3D option label with a reusable list panel that can be opened and closed.

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[]
public void Open()

Shows the configured option panel, synchronizes its list, and raises the open-state event once.

public void Close()

Hides the configured option panel and raises the open-state event once.

public void ToggleOpen()

Switches between the open and closed option-panel states.

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.

protected override void RefreshLabel()

Allows a subclass to derive its displayed label from current semantic state.

protected override void PerformActivation()

Applies the subclass’s semantic activation after common interactability checks.

public TextStudio3DDropdown()

public TextStudio3DOption[] Items { get; set; }

Returns

TextStudio.ThreeD.TextStudio3DOption[]

public int ItemCount { get; }

Returns

System.Int32

public int SelectedIndex { get; set; }

Returns

System.Int32

public TextStudio3DOption SelectedItem { get; }

Returns

TextStudio.ThreeD.TextStudio3DOption

public string SelectedOption { get; }

Returns

System.String

public bool IsOpen { get; }

Returns

System.Boolean

public UnityEvent<bool> OnOpenChanged { get; }

Returns

UnityEngine.Events.UnityEvent{System.Boolean}

public UnityEvent<int> OnSelectionChanged { get; }

Returns

UnityEngine.Events.UnityEvent{System.Int32}

public TextStudio3DOptionEvent OnItemChanged { get; }

Returns

TextStudio.ThreeD.TextStudio3DOptionEvent

public UnityEvent<string> OnOptionChanged { get; }

Returns

UnityEngine.Events.UnityEvent{System.String}