Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Clickable

Manipulator that tracks pointer events on an element and callbacks when the elements is clicked.
Read time 2 minutesLast updated 4 days ago

Definition

public class Clickable : PointerManipulator, IManipulator

Remarks

See _clicked for more information on what it means for an element to be clicked in the context of this manipulator.

Constructors

Properties

Property

Description

activeThis property tracks the activation of the manipulator. Set it to true when the manipulator is activated.
lastMousePositionSpecifies the mouse position saved during the last mouse event on the target Element.

Methods

Method

Description

InvokeInvokes a click action.
OnPointerDownThis method is called when a PointerDownEvent is sent to the target element.
OnPointerMoveThis method is called when a PointerMoveEvent is sent to the target element.
OnPointerUpThis method is called when a PointerUpEvent is sent to the target element.
ProcessCancelEventThis method processes the up cancel sent to the target Element.
ProcessDownEventThis method processes the down event sent to the target Element.
ProcessMoveEventThis method processes the move event sent to the target Element.
ProcessUpEventThis method processes the up event sent to the target Element.
RegisterCallbacksOnTargetCalled to register mouse event callbacks on the target element.
UnregisterCallbacksFromTargetCalled to unregister event callbacks from the target element.

Events

Member

Description

clickedCallback triggered when the target element is clicked.
clickedWithEventInfoCallback triggered when the target element is clicked, including event data.

Inheritance