Version: 2023.1
LanguageEnglish
  • C#

Clickable

class in UnityEngine.UIElements

/

Inherits from:UIElements.PointerManipulator

/

Implemented in:UnityEngine.UIElementsModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Manipulator that tracks Mouse events on an element and callbacks when the elements is clicked.

Properties

active This property tracks the activation of the manipulator. Set it to true when the manipulator is activated.
lastMousePosition Specifies the mouse position saved during the last mouse event on the target Element.

Constructors

Clickable Constructor.

Protected Methods

Invoke Invokes a click action.
OnMouseDown This method is called when a MouseDownEvent is sent to the target element.
OnMouseMove This method is called when a MouseMoveEvent is sent to the target element.
OnMouseUp This method is called when a MouseUpEvent is sent to the target element.
ProcessCancelEvent This method processes the up cancel sent to the target Element.
ProcessDownEvent This method processes the down event sent to the target Element.
ProcessMoveEvent This method processes the move event sent to the target Element.
ProcessUpEvent This method processes the up event sent to the target Element.
RegisterCallbacksOnTarget Called to register mouse event callbacks on the target element.
UnregisterCallbacksFromTarget Called to unregister event callbacks from the target element.

Events

clicked Callback triggered when the target element is clicked.
clickedWithEventInfo Callback triggered when the target element is clicked, including event data.

Inherited Members

Properties

target VisualElement being manipulated.
activators List of Activationfilters.

Protected Methods

CanStartManipulation Checks whether MouseEvent satisfies all of the ManipulatorActivationFilter requirements.
CanStopManipulation Checks whether the MouseEvent is related to this Manipulator.
CanStartManipulation Checks whether PointerEvent satisfies all of the ManipulatorActivationFilter requirements.
CanStopManipulation Checks whether the PointerEvent is related to this Manipulator.