DragAndDrop Manual     Reference     Scripting  
Scripting > Editor Classes > DragAndDrop
DragAndDrop Class

Editor drag & drop operations.

Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.

Class Variables
objectReferences

References to objects being dragged.

paths

The file names being dragged.

visualMode

The visual indication of the drag.

activeControlID

Class Functions
PrepareStartDrag

Clears drag & drop data.

StartDrag

Start a drag operation.

AcceptDrag

Accept a drag operation.

GetGenericData

SetGenericData