Skip to content

TextStudio3DSelector

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

Cycles through an ordered option collection and publishes index, item, and label selection events.

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[]
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.

public void SelectNext()

Selects the next interactable option, respecting the configured wrap policy.

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
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 TextStudio3DSelector()

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 Wrap { get; set; }

Returns

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}

protected override bool ActivateOnPointerRelease { get; }

Returns

System.Boolean