HandleDragAndDrop(DragAndDropArgs)
Override this function to control the drag and drop behavior of the TreeView.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: UnityEditor.IMGUI.Controls
- Assembly: UnityEditor.CoreModule
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:\
-
override TreeView.CanStartDrag to enable dragging TreeViewItems.\
-
override SetupDragAndDrop to set which TreeViewItems are dragged.\
-
override TreeView.HandleDragAndDrop to control the drag and drop behavior of the TreeView.\