Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetupDragAndDrop(SetupDragAndDropArgs)

This function is called when TreeView<TIdentifier>.CanStartDrag returns true.
Read time 1 minuteLast updated 10 days ago

Definition

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:\
  1. override TreeView<TIdentifier>.CanStartDrag to enable dragging TreeViewItems.\
  2. override TreeView<TIdentifier>.SetupDragAndDrop to set which TreeViewItems are dragged.\
  3. override TreeView<TIdentifier>.HandleDragAndDrop to control the drag and drop behavior of the TreeView.\
Additional Resources: DragAndDrop.