Version: 2023.2
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.
OnPointerDown This method is called when a PointerDownEvent is sent to the target element.
OnPointerMove This method is called when a PointerMoveEvent is sent to the target element.
OnPointerUp This method is called when a PointerUpEvent 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.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961