docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DropZoneController

    A droppable is a container that can be used to drop content into.

    Inheritance
    object
    Manipulator
    DropZoneController
    Implements
    IManipulator
    Inherited Members
    Manipulator.target
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public class DropZoneController : Manipulator, IManipulator

    Constructors

    DropZoneController()

    Default constructor.

    Declaration
    public DropZoneController()

    DropZoneController(Action<DragAndDropState>)

    Constructor with a state changed callback.

    Declaration
    public DropZoneController(Action<DragAndDropState> stateChanged)
    Parameters
    Type Name Description
    Action<DragAndDropState> stateChanged

    The callback to be called when the drag and drop state changes.

    Fields

    acceptDrag

    Method called to determine if the target can accept the drag.

    Declaration
    public Func<IEnumerable<object>, bool> acceptDrag
    Field Value
    Type Description
    Func<IEnumerable<object>, bool>

    Methods

    RegisterCallbacksOnTarget()

    Called to register event callbacks on the target element.

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

    UnregisterCallbacksFromTarget()

    Called to unregister event callbacks from the target element.

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

    Events

    dragEnded

    Event fired either when objecs have been dropped on the target or when the user cancels the drag operation or when the user exits the target.

    Declaration
    public event Action dragEnded
    Event Type
    Type Description
    Action
    Remarks

    Use this event to clean up any state that was set up when the drag operation started.

    dropped

    Event fired when the user drops droppable object(s) on the target.

    Declaration
    public event Action<IEnumerable<object>> dropped
    Event Type
    Type Description
    Action<IEnumerable<object>>
    Remarks

    This event is fired only if the target is currently accepting the drag operation.

    Implements

    IManipulator
    In This Article
    Back to top
    Copyright © 2025 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)