Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


HandleDragAndDrop(DragAndDropArgs)

Override this function to control the drag and drop behavior of the TreeView.
Read time 1 minuteLast updated 12 days ago

Definition

Warning
Removed. TreeView is now deprecated. You can likely now use TreeView\<int\> instead and not think more about it. But if you were using that identifier to store EntityId data, you should instead opt to upgrade your TreeViews to use TreeView\<EntityId\> to get the proper typing.
protected virtual DragAndDropVisualMode HandleDragAndDrop(TreeView.DragAndDropArgs args)

Parameters

Drag and drop arguments.

Returns

Type

Description

DragAndDropVisualMode

Remarks

This function is called continously when a drag and drop operation is active and the cursor is over the TreeView. Note that the drag and drop operation can have been initiated outside the TreeView.
Use the state in DragAndDrop to determine the objects for the drag and drop. This function returns a DragAndDropVisualMode value that controls the cursor state.
You control TreeView drag and drop in the following order:\
  1. override TreeView.CanStartDrag to enable dragging TreeViewItems.\
  2. override SetupDragAndDrop to set which TreeViewItems are dragged.\
  3. override TreeView.HandleDragAndDrop to control the drag and drop behavior of the TreeView.\