private void HandleDragging()
{
Event current = Event.current;
switch (current.type)
{
case EventType.DragPerform:
case EventType.DragUpdated:
this.CallEditorDragFunctions();
if (current.type != EventType.Used)
{
bool perform = current.type == EventType.DragPerform;
if (DragAndDrop.visualMode != DragAndDropVisualMode.Copy)
{
DragAndDrop.visualMode = InternalEditorUtility.SceneViewDrag(HandleUtility.PickGameObject(Event.current.mousePosition, true), this.pivot, Event.current.mousePosition, perform);
}
if (perform && (DragAndDrop.visualMode != DragAndDropVisualMode.None))
{
DragAndDrop.AcceptDrag();
current.Use();
GUIUtility.ExitGUI();
}
current.Use();
}
break;
case EventType.DragExited:
this.CallEditorDragFunctions();
this.CleanupEditorDragFunctions();
break;
}
}