Implement on your component to receive input events. The EventSystem that dispatches these is created automatically — no manual setup required. Pointer events raycast against visible mesh geometry, so a Collider is not needed (only for physics raycasts).

interface IPointerEventHandler {
    onPointerClick(args: PointerEventData): any;
    onPointerDown(args: PointerEventData): any;
    onPointerEnter(args: PointerEventData): any;
    onPointerExit(args: PointerEventData): any;
    onPointerMove(args: PointerEventData): any;
    onPointerUp(args: PointerEventData): any;
}

Hierarchy (View Summary)

Implemented by

Methods

  • Called when an object (or any child object) is clicked. Raycasting hits the object's visible mesh geometry — a Collider is NOT required (colliders are only used for physics raycasts via context.physics.engine.raycast()). The EventSystem that dispatches this is created automatically; you do not need to add it manually.

    Parameters

    Returns any