Skip to content

TextStudio3DControl

ClassTextStudio.ThreeDTextStudio.3D
[ExecuteAlways]
[DisallowMultipleComponent]
public abstract class TextStudio3DControl : MonoBehaviour

Interaction-system-independent base for spatial controls. Every pointer keeps an independent hover and press session, while controls decide whether simultaneous presses are meaningful.

public void RefreshControl()

Re-resolves the label renderer and reapplies current content, theme, and interaction visuals.

public void SetError(bool hasError)

Changes the semantic error state and requests error feedback when entering that state.

Parameters

Name Type
hasError System.Boolean

HoverEnter(TextStudio3DInteractionContext)

Section titled “HoverEnter(TextStudio3DInteractionContext)”
public void HoverEnter(TextStudio3DInteractionContext context)

Begins or refreshes a pointer’s hover session and emits hover feedback once on entry.

Parameters

Name Type
context TextStudio.ThreeD.TextStudio3DInteractionContext
public void HoverMove(TextStudio3DInteractionContext context)

Updates a hovering pointer’s pose and forwards movement as a drag while that pointer is pressed.

Parameters

Name Type
context TextStudio.ThreeD.TextStudio3DInteractionContext
public void HoverExit(TextStudio3DInteractionContext context)

Ends a pointer’s hover state and cancels an uncaptured active press when required by the capture policy.

Parameters

Name Type
context TextStudio.ThreeD.TextStudio3DInteractionContext
public bool Press(TextStudio3DInteractionContext context)

Attempts to begin a primary-button press under the control’s interactability and concurrent-pointer policies.

Parameters

Name Type
context TextStudio.ThreeD.TextStudio3DInteractionContext

Returns

System.Boolean: True when this pointer owns or already owned an accepted press.

public bool Drag(TextStudio3DInteractionContext context)

Updates an accepted pressed pointer and invokes the control-specific drag hook.

Parameters

Name Type
context TextStudio.ThreeD.TextStudio3DInteractionContext

Returns

System.Boolean: False when the control is disabled or the pointer does not own a press.

public bool Release(TextStudio3DInteractionContext context)

Ends an accepted press and activates according to hover, capture, and release policies.

Parameters

Name Type
context TextStudio.ThreeD.TextStudio3DInteractionContext

Returns

System.Boolean: True when a pressed session was released or canceled.

CancelInteraction(TextStudio3DInteractionContext)

Section titled “CancelInteraction(TextStudio3DInteractionContext)”
public bool CancelInteraction(TextStudio3DInteractionContext context)

Cancels and removes one pointer session without activating the control.

Parameters

Name Type
context TextStudio.ThreeD.TextStudio3DInteractionContext

Returns

System.Boolean: True when the session had active hover or press state.

public void CancelAllInteractions()

Cancels every pointer session, raises cancellation events for active sessions, and restores idle visuals.

public void ResetInteractionState()

Cancels pointer sessions and clears navigation selection and semantic error state.

public void Activate()

Performs a programmatic activation when the control is interactable.

public void Activate(TextStudio3DInteractionContext context)

Performs activation with caller-supplied interaction identity, then raises semantic events and feedback.

Parameters

Name Type
context TextStudio.ThreeD.TextStudio3DInteractionContext

NotifyValueChanged(TextStudio3DInteractionContext)

Section titled “NotifyValueChanged(TextStudio3DInteractionContext)”
protected void NotifyValueChanged(TextStudio3DInteractionContext context = default)

Requests generic value-changed feedback for a subclass after its observable value changes.

Parameters

Name Type
context TextStudio.ThreeD.TextStudio3DInteractionContext
protected void SetSelectedVisual(bool selected)

Changes the subclass-owned selected-state flag and refreshes the resolved theme visuals.

Parameters

Name Type
selected System.Boolean
protected void SetLabelText(string value)

Updates the retained Text Studio label immediately without starting reveal playback.

Parameters

Name Type
value System.String
protected virtual void RefreshLabel()

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

OnPointerEntered(TextStudio3DInteractionContext)

Section titled “OnPointerEntered(TextStudio3DInteractionContext)”
protected virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 abstract void PerformActivation()

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

protected TextStudio3DControl()

public TextStudioText Label { get; set; }

Returns

TextStudio.TextStudioText

public TextStudio3DText LabelRenderer { get; }

Returns

TextStudio.ThreeD.TextStudio3DText

public TextStudio3DControlTheme Theme { get; set; }

Returns

TextStudio.ThreeD.TextStudio3DControlTheme

public Transform VisualRoot { get; }

Returns

UnityEngine.Transform

public bool Interactable { get; set; }

Returns

System.Boolean

public TextStudio3DPointerCapturePolicy CapturePolicy { get; set; }

Returns

TextStudio.ThreeD.TextStudio3DPointerCapturePolicy

public TextStudio3DConcurrentPressPolicy ConcurrentPressPolicy { get; set; }

Returns

TextStudio.ThreeD.TextStudio3DConcurrentPressPolicy

public TextStudio3DReleaseActivationPolicy ReleaseActivationPolicy { get; set; }

Returns

TextStudio.ThreeD.TextStudio3DReleaseActivationPolicy

public bool HasError { get; }

Returns

System.Boolean

public bool IsHovered { get; }

Returns

System.Boolean

public bool IsPressed { get; }

Returns

System.Boolean

public bool IsSelected { get; }

Returns

System.Boolean

public bool IsNavigationSelected { get; }

Returns

System.Boolean

public int ActivePointerCount { get; }

Returns

System.Int32

public float CurrentPressure { get; }

Returns

System.Single

public string AccessibilityLabel { get; set; }

Returns

System.String

public string AccessibilityHint { get; set; }

Returns

System.String

public TextStudio3DControlState CurrentState { get; }

Returns

TextStudio.ThreeD.TextStudio3DControlState

public UnityEvent<TextStudio3DControlState> OnStateChanged { get; }

Returns

UnityEngine.Events.UnityEvent{TextStudio.ThreeD.TextStudio3DControlState}

public TextStudio3DInteractionContextEvent OnHoverEntered { get; }

Returns

TextStudio.ThreeD.TextStudio3DInteractionContextEvent

public TextStudio3DInteractionContextEvent OnHoverExited { get; }

Returns

TextStudio.ThreeD.TextStudio3DInteractionContextEvent

public TextStudio3DInteractionContextEvent OnPressStarted { get; }

Returns

TextStudio.ThreeD.TextStudio3DInteractionContextEvent

public TextStudio3DInteractionContextEvent OnPressEnded { get; }

Returns

TextStudio.ThreeD.TextStudio3DInteractionContextEvent

public TextStudio3DInteractionContextEvent OnCanceled { get; }

Returns

TextStudio.ThreeD.TextStudio3DInteractionContextEvent

public TextStudio3DInteractionContextEvent OnActivated { get; }

Returns

TextStudio.ThreeD.TextStudio3DInteractionContextEvent

public TextStudio3DFeedbackRequestEvent OnFeedbackRequested { get; }

Returns

TextStudio.ThreeD.TextStudio3DFeedbackRequestEvent

protected virtual bool ActivateOnPointerRelease { get; }

Returns

System.Boolean

protected virtual bool ShowsDisabledVisualWhenNotInteractable { get; }

Returns

System.Boolean

public event Action<TextStudio3DFeedbackRequest> FeedbackRequested

Raised for generic visual, audio, or haptic feedback adapters after the matching Unity event.

Returns

System.Action{TextStudio.ThreeD.TextStudio3DFeedbackRequest}