SetupDragAndDrop(SetupDragAndDropArgs)
This function is called when TreeView<TIdentifier>.CanStartDrag returns true.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEditor.IMGUI.Controls
- Assembly: UnityEditor.CoreModule
protected virtual void SetupDragAndDrop(TreeView<TIdentifier>.SetupDragAndDropArgs args)
Parameters
Remarks
Override this function to set the global DragAndDrop state and set which items can be dragged and dropped. Use TreeView<TIdentifier>.FindRows to convert the dragged IDs to TreeViewItems if needed.
You control TreeView drag and drop in the following order:\
-
override TreeView<TIdentifier>.CanStartDrag to enable dragging TreeViewItems.\
-
override TreeView<TIdentifier>.SetupDragAndDrop to set which TreeViewItems are dragged.\
-
override TreeView<TIdentifier>.HandleDragAndDrop to control the drag and drop behavior of the TreeView.\
Additional Resources: DragAndDrop.