TextStudio3DSelector
[AddComponentMenu("Text Studio/Spatial UI/3D Selector")]public sealed class TextStudio3DSelector : TextStudio3DControlCycles through an ordered option collection and publishes index, item, and label selection events.
Methods
Section titled “Methods”
SetLabels(params string[])
Section titled “SetLabels(params string[])”public void SetLabels(params string[] labels)Replaces all selector items with defensive option snapshots created from the supplied labels.
Parameters
| Name | Type |
|---|---|
labels |
System.String[] |
Select(int, bool)
Section titled “Select(int, bool)”public bool Select(int index, bool notify)Selects an interactable option by index, updates the label, and optionally publishes index, item, and label events.
Parameters
| Name | Type |
|---|---|
index |
System.Int32 |
notify |
System.Boolean |
Returns
System.Boolean: True when the selected index changed.
SelectNext()
Section titled “SelectNext()”public void SelectNext()Selects the next interactable option, respecting the configured wrap policy.
SelectPrevious()
Section titled “SelectPrevious()”public void SelectPrevious()Selects the preceding interactable option, respecting the configured wrap policy.
OnPointerEntered(TextStudio3DInteractionContext)
Section titled “OnPointerEntered(TextStudio3DInteractionContext)”protected override void OnPointerEntered(TextStudio3DInteractionContext context)Allows a subclass to respond after a pointer begins hovering.
Parameters
| Name | Type |
|---|---|
context |
TextStudio.ThreeD.TextStudio3DInteractionContext |
OnPointerExited(TextStudio3DInteractionContext)
Section titled “OnPointerExited(TextStudio3DInteractionContext)”protected override void OnPointerExited(TextStudio3DInteractionContext context)Allows a subclass to respond after a pointer stops hovering.
Parameters
| Name | Type |
|---|---|
context |
TextStudio.ThreeD.TextStudio3DInteractionContext |
OnPointerPressed(TextStudio3DInteractionContext)
Section titled “OnPointerPressed(TextStudio3DInteractionContext)”protected override void OnPointerPressed(TextStudio3DInteractionContext context)Allows a subclass to initialize state for an accepted primary-button press.
Parameters
| Name | Type |
|---|---|
context |
TextStudio.ThreeD.TextStudio3DInteractionContext |
OnPointerDragged(TextStudio3DInteractionContext)
Section titled “OnPointerDragged(TextStudio3DInteractionContext)”protected override void OnPointerDragged(TextStudio3DInteractionContext context)Allows a subclass to update its value or transform from an accepted pointer drag.
Parameters
| Name | Type |
|---|---|
context |
TextStudio.ThreeD.TextStudio3DInteractionContext |
OnPointerReleased(TextStudio3DInteractionContext)
Section titled “OnPointerReleased(TextStudio3DInteractionContext)”protected override void OnPointerReleased(TextStudio3DInteractionContext context)Allows a subclass to finalize an accepted pointer release before optional activation.
Parameters
| Name | Type |
|---|---|
context |
TextStudio.ThreeD.TextStudio3DInteractionContext |
OnPointerCanceled(TextStudio3DInteractionContext)
Section titled “OnPointerCanceled(TextStudio3DInteractionContext)”protected override void OnPointerCanceled(TextStudio3DInteractionContext context)Allows a subclass to discard transient state after a pointer session is canceled.
Parameters
| Name | Type |
|---|---|
context |
TextStudio.ThreeD.TextStudio3DInteractionContext |
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”
TextStudio3DSelector()
Section titled “TextStudio3DSelector()”public TextStudio3DSelector()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
public bool Wrap { get; set; }Returns
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}
ActivateOnPointerRelease
Section titled “ActivateOnPointerRelease”protected override bool ActivateOnPointerRelease { get; }Returns
System.Boolean