Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetupDragAndDrop(SetupDragAndDropArgs)

This function is called when TreeView.CanStartDrag returns true.
Read time 1 minuteLast updated 14 days ago

Definition

protected virtual void SetupDragAndDrop(TreeView.SetupDragAndDropArgs args)

Parameters

Remarks

Override this function to set the global DragAndDrop state and set which items can be dragged and dropped. Use TreeView.FindRows to convert the dragged IDs to TreeViewItems if needed.
You control TreeView drag and drop in the following order:\
  1. override TreeView.CanStartDrag to enable dragging TreeViewItems.\
  2. override TreeView.SetupDragAndDrop to set which TreeViewItems are dragged.\
  3. override TreeView.HandleDragAndDrop to control the drag and drop behavior of the TreeView.\
Additional Resources: DragAndDrop.