Skip to content

TextStudio3DPointerRaycaster

ClassTextStudio.ThreeDTextStudio.3D
[AddComponentMenu("Text Studio/Spatial UI/3D Pointer Raycaster")]
[DisallowMultipleComponent]
public sealed class TextStudio3DPointerRaycaster : MonoBehaviour

Routes scripted, mouse, touch, ray, gaze, and direct pointer sessions to colliders owned by spatial controls.

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

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

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

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.

public void CancelAllPointers()

Cancels every retained pointer session and clears all hovered and pressed targets.

public TextStudio3DPointerRaycaster()

public Camera PointerCamera { get; set; }

Returns

UnityEngine.Camera

public LayerMask Layers { get; set; }

Returns

UnityEngine.LayerMask

public float MaximumDistance { get; set; }

Returns

System.Single

public bool UseLegacyMouse { get; set; }

Returns

System.Boolean

public int ActivePointerCount { get; }

Returns

System.Int32

public TextStudio3DControl HoveredTarget { get; }

Returns

TextStudio.ThreeD.TextStudio3DControl

public TextStudio3DControl PressedTarget { get; }

Returns

TextStudio.ThreeD.TextStudio3DControl