ドキュメント

Unity Engine

Unity Engine

CanStartDrag(CanStartDragArgs)

This function is called whenever a TreeViewItem is clicked and dragged. It returns false by default.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

注意
Removed. TreeView is now deprecated. You can likely now use TreeView\<int\> instead and not think more about it. But if you were using that identifier to store InstanceID data, you should instead opt to upgrade your TreeViews to use TreeView\<InstanceID\> to get the proper typing.
protected virtual bool CanStartDrag(TreeView.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:\
  1. override TreeView.CanStartDrag to enable dragging TreeViewItems.\
  2. override SetupDragAndDrop to set which TreeViewItems are dragged.\
  3. override TreeView.HandleDragAndDrop to control the drag and drop behavior of the TreeView.\