TextStudio3DControl
[ExecuteAlways][DisallowMultipleComponent]public abstract class TextStudio3DControl : MonoBehaviourInteraction-system-independent base for spatial controls. Every pointer keeps an independent hover and press session, while controls decide whether simultaneous presses are meaningful.
Methods
Section titled “Methods”
RefreshControl()
Section titled “RefreshControl()”public void RefreshControl()Re-resolves the label renderer and reapplies current content, theme, and interaction visuals.
SetError(bool)
Section titled “SetError(bool)”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 |
HoverMove(TextStudio3DInteractionContext)
Section titled “HoverMove(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 |
HoverExit(TextStudio3DInteractionContext)
Section titled “HoverExit(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 |
Press(TextStudio3DInteractionContext)
Section titled “Press(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.
Drag(TextStudio3DInteractionContext)
Section titled “Drag(TextStudio3DInteractionContext)”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.
Release(TextStudio3DInteractionContext)
Section titled “Release(TextStudio3DInteractionContext)”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.
CancelAllInteractions()
Section titled “CancelAllInteractions()”public void CancelAllInteractions()Cancels every pointer session, raises cancellation events for active sessions, and restores idle visuals.
ResetInteractionState()
Section titled “ResetInteractionState()”public void ResetInteractionState()Cancels pointer sessions and clears navigation selection and semantic error state.
Activate()
Section titled “Activate()”public void Activate()Performs a programmatic activation when the control is interactable.
Activate(TextStudio3DInteractionContext)
Section titled “Activate(TextStudio3DInteractionContext)”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 |
SetSelectedVisual(bool)
Section titled “SetSelectedVisual(bool)”protected void SetSelectedVisual(bool selected)Changes the subclass-owned selected-state flag and refreshes the resolved theme visuals.
Parameters
| Name | Type |
|---|---|
selected |
System.Boolean |
SetLabelText(string)
Section titled “SetLabelText(string)”protected void SetLabelText(string value)Updates the retained Text Studio label immediately without starting reveal playback.
Parameters
| Name | Type |
|---|---|
value |
System.String |
RefreshLabel()
Section titled “RefreshLabel()”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 |
PerformActivation()
Section titled “PerformActivation()”protected abstract void PerformActivation()Applies the subclass’s semantic activation after common interactability checks.
Constructors
Section titled “Constructors”
TextStudio3DControl()
Section titled “TextStudio3DControl()”protected TextStudio3DControl()Properties
Section titled “Properties”
public TextStudioText Label { get; set; }Returns
TextStudio.TextStudioText
LabelRenderer
Section titled “LabelRenderer”public TextStudio3DText LabelRenderer { get; }Returns
TextStudio.ThreeD.TextStudio3DText
public TextStudio3DControlTheme Theme { get; set; }Returns
TextStudio.ThreeD.TextStudio3DControlTheme
VisualRoot
Section titled “VisualRoot”public Transform VisualRoot { get; }Returns
UnityEngine.Transform
Interactable
Section titled “Interactable”public bool Interactable { get; set; }Returns
System.Boolean
CapturePolicy
Section titled “CapturePolicy”public TextStudio3DPointerCapturePolicy CapturePolicy { get; set; }Returns
TextStudio.ThreeD.TextStudio3DPointerCapturePolicy
ConcurrentPressPolicy
Section titled “ConcurrentPressPolicy”public TextStudio3DConcurrentPressPolicy ConcurrentPressPolicy { get; set; }Returns
TextStudio.ThreeD.TextStudio3DConcurrentPressPolicy
ReleaseActivationPolicy
Section titled “ReleaseActivationPolicy”public TextStudio3DReleaseActivationPolicy ReleaseActivationPolicy { get; set; }Returns
TextStudio.ThreeD.TextStudio3DReleaseActivationPolicy
HasError
Section titled “HasError”public bool HasError { get; }Returns
System.Boolean
IsHovered
Section titled “IsHovered”public bool IsHovered { get; }Returns
System.Boolean
IsPressed
Section titled “IsPressed”public bool IsPressed { get; }Returns
System.Boolean
IsSelected
Section titled “IsSelected”public bool IsSelected { get; }Returns
System.Boolean
IsNavigationSelected
Section titled “IsNavigationSelected”public bool IsNavigationSelected { get; }Returns
System.Boolean
ActivePointerCount
Section titled “ActivePointerCount”public int ActivePointerCount { get; }Returns
System.Int32
CurrentPressure
Section titled “CurrentPressure”public float CurrentPressure { get; }Returns
System.Single
AccessibilityLabel
Section titled “AccessibilityLabel”public string AccessibilityLabel { get; set; }Returns
System.String
AccessibilityHint
Section titled “AccessibilityHint”public string AccessibilityHint { get; set; }Returns
System.String
CurrentState
Section titled “CurrentState”public TextStudio3DControlState CurrentState { get; }Returns
TextStudio.ThreeD.TextStudio3DControlState
OnStateChanged
Section titled “OnStateChanged”public UnityEvent<TextStudio3DControlState> OnStateChanged { get; }Returns
UnityEngine.Events.UnityEvent{TextStudio.ThreeD.TextStudio3DControlState}
OnHoverEntered
Section titled “OnHoverEntered”public TextStudio3DInteractionContextEvent OnHoverEntered { get; }Returns
TextStudio.ThreeD.TextStudio3DInteractionContextEvent
OnHoverExited
Section titled “OnHoverExited”public TextStudio3DInteractionContextEvent OnHoverExited { get; }Returns
TextStudio.ThreeD.TextStudio3DInteractionContextEvent
OnPressStarted
Section titled “OnPressStarted”public TextStudio3DInteractionContextEvent OnPressStarted { get; }Returns
TextStudio.ThreeD.TextStudio3DInteractionContextEvent
OnPressEnded
Section titled “OnPressEnded”public TextStudio3DInteractionContextEvent OnPressEnded { get; }Returns
TextStudio.ThreeD.TextStudio3DInteractionContextEvent
OnCanceled
Section titled “OnCanceled”public TextStudio3DInteractionContextEvent OnCanceled { get; }Returns
TextStudio.ThreeD.TextStudio3DInteractionContextEvent
OnActivated
Section titled “OnActivated”public TextStudio3DInteractionContextEvent OnActivated { get; }Returns
TextStudio.ThreeD.TextStudio3DInteractionContextEvent
OnFeedbackRequested
Section titled “OnFeedbackRequested”public TextStudio3DFeedbackRequestEvent OnFeedbackRequested { get; }Returns
TextStudio.ThreeD.TextStudio3DFeedbackRequestEvent
ActivateOnPointerRelease
Section titled “ActivateOnPointerRelease”protected virtual bool ActivateOnPointerRelease { get; }Returns
System.Boolean
ShowsDisabledVisualWhenNotInteractable
Section titled “ShowsDisabledVisualWhenNotInteractable”protected virtual bool ShowsDisabledVisualWhenNotInteractable { get; }Returns
System.Boolean
Events
Section titled “Events”
FeedbackRequested
Section titled “FeedbackRequested”public event Action<TextStudio3DFeedbackRequest> FeedbackRequestedRaised for generic visual, audio, or haptic feedback adapters after the matching Unity event.
Returns
System.Action{TextStudio.ThreeD.TextStudio3DFeedbackRequest}