CanStartDrag(CanStartDragArgs)
This function is called whenever a TreeViewItem is clicked and dragged. It returns false by default.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEditor.IMGUI.Controls
- Assembly: UnityEditor.CoreModule
protected virtual bool CanStartDrag(TreeView<TIdentifier>.CanStartDragArgs args)
Parameters
Returns
Type | Description |
|---|---|
| bool |
Remarks
Override this function so it returns true to enable drag and drop behavior for TreeViewItems.
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.\