コード例 #1
0
        internal override Object GetInspectedObject()
        {
            Editor editor = InspectorWindowUtils.GetFirstNonImportInspectorEditor(tracker.activeEditors);

            if (editor == null)
            {
                return(null);
            }
            return(editor.target);
        }
コード例 #2
0
        void HandleNativeDragDropInBottomArea(Editor[] editors, Rect rect)
        {
            if (!DraggingOverRect(rect))
            {
                return;
            }

            Editor editor = InspectorWindowUtils.GetFirstNonImportInspectorEditor(editors);

            if (editor == null)
            {
                return;
            }

            DragAndDrop.visualMode = DragAndDrop.Drop(DragAndDropWindowTarget.inspector, editor.targets, Event.current.type == EventType.DragPerform);

            if (Event.current.type == EventType.DragPerform)
            {
                DragAndDrop.AcceptDrag();
                m_TargetIndex = -1;
                GUIUtility.ExitGUI();
            }
        }