Back to API Reference
Class

TextPointerEvent

sealed

Mutable carrier for consumable pointer events emitted by UniTextBase. On click/context resolution, Consumed suppresses propagation to parent UI. During PointerPressed it suppresses later ordered component defaults such as caret placement while preserving parent drag/scroll propagation.

Remarks

The host reuses ONE instance across emissions (zero allocation per pointer event, the PointerEventData model) — do not retain a reference beyond the callback; copy the fields you need. Multi-tap detection (double / triple click → word / line selection) is the consumer's responsibility — the host emits one event per click, without aggregating taps.
public TextHitResult Hit{ get; set }

The hit-test result produced from the originating screen position.

public PointerTrigger Trigger{ get; set }

What initiated the event. Use to distinguish primary clicks from context-menu requests (right-click on desktop, long-press on touch / pen).

public PointerKind Kind{ get; set }

Physical device class behind the event.

public int PointerId{ get; set }

Platform pointer identity, stable for the lifetime of one pointer contact.

public Vector2 ScreenPosition{ get; set }

Originating pointer position in screen coordinates. Useful for placing context-menu UI directly under the press without re-deriving from the hit's glyph position (which lives in text-local space).

public Camera EventCamera{ get; set }

Camera that owns the event (null for screen-space overlay canvases). Required for any subsequent screen-to-local conversions on the consumer side.

public PointerModifiers Modifiers{ get; set }

Keyboard modifier keys held at the moment of the event.

public bool Consumed{ get; set }

Set to by a subscriber that claimed the event. Meaning is phase-specific: a press suppresses later ordered component defaults; release suppresses the pending click; resolved click/context also suppresses propagation to the parent UI.

[ctor]public TextPointerEvent()

Creates an empty reusable carrier that the host populates before dispatch.

[ctor]public TextPointerEvent(TextHitResult hit, PointerTrigger trigger, Vector2 screenPosition, Camera eventCamera, PointerModifiers modifiers, PointerKind kind, int pointerId)

Creates a pointer-event snapshot.