Interface IReorderableListDropTarget
Can be implemented along with IReorderableListAdaptor when drop insertion or ordering is desired.
Namespace: Unity.VisualScripting.ReorderableList
Syntax
public interface IReorderableListDropTarget
Remarks
This type of "drop" functionality can occur when the "drag" phase of the drag and drop operation was initiated elsewhere. For example, a custom IReorderableListAdaptor could insert entirely new items by dragging and dropping from the Unity "Project" window.
Methods
CanDropInsert(Int32)
Determines whether an item is being dragged and that it can be inserted or moved by dropping somewhere into the reorderable list control.
Declaration
bool CanDropInsert(int insertionIndex)
Parameters
Type | Name | Description |
---|---|---|
Int32 | insertionIndex | Zero-based index of insertion. |
Returns
Type | Description |
---|---|
Boolean | A value of |
Remarks
This method is always called whilst drawing an editor GUI.
ProcessDropInsertion(Int32)
Processes the current drop insertion operation when CanDropInsert(Int32)
returns a value of true
to process, accept or cancel.
Declaration
void ProcessDropInsertion(int insertionIndex)
Parameters
Type | Name | Description |
---|---|---|
Int32 | insertionIndex | Zero-based index of insertion. |
Remarks
This method is always called whilst drawing an editor GUI.
This method is only called when CanDropInsert(Int32)
returns a value of true
.