{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class Pressable | App UI | 0.5.5
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Pressable

    Pressable Manipulator, used on Button elements.

    Inheritance
    object
    Manipulator
    MouseManipulator
    PointerManipulator
    Pressable
    Draggable
    Implements
    IManipulator
    Inherited Members
    PointerManipulator.CanStartManipulation(IPointerEvent)
    PointerManipulator.CanStopManipulation(IPointerEvent)
    MouseManipulator.CanStartManipulation(IMouseEvent)
    MouseManipulator.CanStopManipulation(IMouseEvent)
    MouseManipulator.activators
    Manipulator.target
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.AppUI.UI
    Assembly: solution.dll
    Syntax
    public class Pressable : PointerManipulator, IManipulator

    Constructors

    Name Description
    Pressable()

    Constructor.

    Pressable(Action)

    Constructor.

    Pressable(Action<EventBase>)

    Constructor.

    Properties

    Name Description
    active

    Check if the element is currently pressed.

    keepEventPropagation

    When true, the event propagation will not be stopped when the element is pressed.

    longPressDuration

    The duration of a long press in milliseconds.

    The default value is -1.

    Using a negative value will disable long press.

    Methods

    Name Description
    ForceActivePseudoState()

    Force the active pseudo state on the target element.

    ProcessDownEvent(EventBase, Vector2, int)

    Custom handling of pointer enter events.

    ProcessMoveEvent(EventBase, Vector2)

    Custom handling of pointer move events.

    ProcessUpEvent(EventBase, Vector2, int)

    Custom handling of pointer leave events.

    RegisterCallbacksOnTarget()

    Called to register event callbacks from the target element.

    UnregisterCallbacksFromTarget()

    Called to unregister event callbacks from the target element.

    Events

    Name Description
    clicked

    The event invoked when the element is pressed.

    clickedWithEventInfo

    The event invoked when the element is pressed.

    longClicked

    The event invoked when the element is pressed for a long time.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)