TextStudio3DPointerRaycaster
[AddComponentMenu("Text Studio/Spatial UI/3D Pointer Raycaster")][DisallowMultipleComponent]public sealed class TextStudio3DPointerRaycaster : MonoBehaviourRoutes scripted, mouse, touch, ray, gaze, and direct pointer sessions to colliders owned by spatial controls.
Methods
Section titled “Methods”
ProcessPointer(int, Ray, bool, bool, bool, TextStudio3DInteractionSource, TextStudio3DHandedness, float, ITextStudio3DFeedbackOutput)
Section titled “ProcessPointer(int, Ray, bool, bool, bool, TextStudio3DInteractionSource, TextStudio3DHandedness, float, ITextStudio3DFeedbackOutput)”public bool ProcessPointer(int pointerId, Ray worldRay, bool isPressed, bool pressedThisFrame, bool releasedThisFrame, TextStudio3DInteractionSource source = TextStudio3DInteractionSource.Ray, TextStudio3DHandedness handedness = TextStudio3DHandedness.None, float pressure = 1, ITextStudio3DFeedbackOutput feedbackOutput = null)Drives one ray pointer from a mouse, touch, custom device, or integration. Calls are independent per pointer ID and captured controls continue receiving drag updates when the ray leaves their collider.
Parameters
| Name | Type |
|---|---|
pointerId |
System.Int32 |
worldRay |
UnityEngine.Ray |
isPressed |
System.Boolean |
pressedThisFrame |
System.Boolean |
releasedThisFrame |
System.Boolean |
source |
TextStudio.ThreeD.TextStudio3DInteractionSource |
handedness |
TextStudio.ThreeD.TextStudio3DHandedness |
pressure |
System.Single |
feedbackOutput |
TextStudio.ThreeD.ITextStudio3DFeedbackOutput |
Returns
System.Boolean
GetHoveredTarget(int)
Section titled “GetHoveredTarget(int)”public TextStudio3DControl GetHoveredTarget(int pointerId)Returns the control currently hovered by a pointer, or null when it has no active hover target.
Parameters
| Name | Type |
|---|---|
pointerId |
System.Int32 |
Returns
TextStudio.ThreeD.TextStudio3DControl
GetPressedTarget(int)
Section titled “GetPressedTarget(int)”public TextStudio3DControl GetPressedTarget(int pointerId)Returns the control that owns a pointer’s accepted press, or null when it has none.
Parameters
| Name | Type |
|---|---|
pointerId |
System.Int32 |
Returns
TextStudio.ThreeD.TextStudio3DControl
CancelPointer(int)
Section titled “CancelPointer(int)”public bool CancelPointer(int pointerId)Cancels hover and press state for one pointer and removes its retained routing session.
Parameters
| Name | Type |
|---|---|
pointerId |
System.Int32 |
Returns
System.Boolean: True when a retained pointer session was canceled.
CancelAllPointers()
Section titled “CancelAllPointers()”public void CancelAllPointers()Cancels every retained pointer session and clears all hovered and pressed targets.
Constructors
Section titled “Constructors”
TextStudio3DPointerRaycaster()
Section titled “TextStudio3DPointerRaycaster()”public TextStudio3DPointerRaycaster()Properties
Section titled “Properties”
PointerCamera
Section titled “PointerCamera”public Camera PointerCamera { get; set; }Returns
UnityEngine.Camera
Layers
Section titled “Layers”public LayerMask Layers { get; set; }Returns
UnityEngine.LayerMask
MaximumDistance
Section titled “MaximumDistance”public float MaximumDistance { get; set; }Returns
System.Single
UseLegacyMouse
Section titled “UseLegacyMouse”public bool UseLegacyMouse { get; set; }Returns
System.Boolean
ActivePointerCount
Section titled “ActivePointerCount”public int ActivePointerCount { get; }Returns
System.Int32
HoveredTarget
Section titled “HoveredTarget”public TextStudio3DControl HoveredTarget { get; }Returns
TextStudio.ThreeD.TextStudio3DControl
PressedTarget
Section titled “PressedTarget”public TextStudio3DControl PressedTarget { get; }Returns
TextStudio.ThreeD.TextStudio3DControl