docs.unity3d.com
    Show / Hide Table of Contents

    Class Dragger

    Manipulator that allows dragging from a container component.

    Inheritance
    Object
    Manipulator
    MouseManipulator
    PointerManipulator
    Dragger
    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
    Syntax
    public class Dragger : PointerManipulator, IManipulator

    Constructors

    Dragger(Action<PointerMoveEvent>, Action<PointerMoveEvent>, Action<PointerUpEvent>, Action)

    Creates a new Dragger instance.

    Declaration
    public Dragger(Action<PointerMoveEvent> dragStarted, Action<PointerMoveEvent> dragging, Action<PointerUpEvent> dragEnded, Action dragCanceled)
    Parameters
    Type Name Description
    Action<PointerMoveEvent> dragStarted

    The event that will be fired when a drag starts.

    Action<PointerMoveEvent> dragging

    The event that will be fired when a drag is in progress.

    Action<PointerUpEvent> dragEnded

    The event that will be fired when a drag ends.

    Action dragCanceled

    The event that will be fired when a drag is cancelled.

    Properties

    acceptDrag

    Delegate that will be called when a drag should be accepted.

    Declaration
    public Func<bool> acceptDrag { get; set; }
    Property Value
    Type Description
    Func<Boolean>
    Remarks

    If this delegate is not set, the drag will be accepted by default.

    dragThreshold

    The threshold in pixels after which a drag will start.

    Declaration
    public float dragThreshold { get; set; }
    Property Value
    Type Description
    Single

    isActive

    Whether the drag is currently active.

    Declaration
    public bool isActive { get; }
    Property Value
    Type Description
    Boolean

    Methods

    Cancel()

    Cancels the drag.

    Declaration
    public void Cancel()

    RegisterCallbacksOnTarget()

    Declaration
    protected override void RegisterCallbacksOnTarget()
    Overrides
    Manipulator.RegisterCallbacksOnTarget()

    UnregisterCallbacksFromTarget()

    Declaration
    protected override void UnregisterCallbacksFromTarget()
    Overrides
    Manipulator.UnregisterCallbacksFromTarget()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023