GetDragAndDropPaths() static private method

static private GetDragAndDropPaths ( int draggedInstanceID, List selectedInstanceIDs ) : string[]
draggedInstanceID int
selectedInstanceIDs List
return string[]
Ejemplo n.º 1
0
        internal static void StartDrag(int draggedInstanceID, List <int> selectedInstanceIDs)
        {
            DragAndDrop.PrepareStartDrag();
            string title = "";

            if (ProjectWindowUtil.IsFavoritesItem(draggedInstanceID))
            {
                DragAndDrop.SetGenericData(ProjectWindowUtil.k_DraggingFavoriteGenericData, draggedInstanceID);
                DragAndDrop.objectReferences = new UnityEngine.Object[0];
            }
            else
            {
                bool flag = ProjectWindowUtil.IsFolder(draggedInstanceID);
                DragAndDrop.objectReferences = ProjectWindowUtil.GetDragAndDropObjects(draggedInstanceID, selectedInstanceIDs);
                DragAndDrop.SetGenericData(ProjectWindowUtil.k_IsFolderGenericData, (!flag) ? "" : "isFolder");
                string[] dragAndDropPaths = ProjectWindowUtil.GetDragAndDropPaths(draggedInstanceID, selectedInstanceIDs);
                if (dragAndDropPaths.Length > 0)
                {
                    DragAndDrop.paths = dragAndDropPaths;
                }
                if (DragAndDrop.objectReferences.Length > 1)
                {
                    title = "<Multiple>";
                }
                else
                {
                    title = ObjectNames.GetDragAndDropTitle(InternalEditorUtility.GetObjectFromInstanceID(draggedInstanceID));
                }
            }
            DragAndDrop.StartDrag(title);
        }
Ejemplo n.º 2
0
 public override void StartDrag(TreeViewItem draggedItem, List <int> draggedItemIDs)
 {
     DragAndDrop.PrepareStartDrag();
     DragAndDrop.objectReferences = ProjectWindowUtil.GetDragAndDropObjects(draggedItem.id, draggedItemIDs);
     DragAndDrop.paths            = ProjectWindowUtil.GetDragAndDropPaths(draggedItem.id, draggedItemIDs);
     if (DragAndDrop.objectReferences.Length > 1)
     {
         DragAndDrop.StartDrag("<Multiple>");
     }
     else
     {
         DragAndDrop.StartDrag(ObjectNames.GetDragAndDropTitle(InternalEditorUtility.GetObjectFromInstanceID(draggedItem.id)));
     }
 }
Ejemplo n.º 3
0
 public override void StartDrag(TreeViewItem draggedItem, List <int> draggedItemIDs)
 {
     DragAndDrop.PrepareStartDrag();
     draggedItemIDs = base.m_TreeView.SortIDsInVisiblityOrder(draggedItemIDs);
     DragAndDrop.objectReferences = ProjectWindowUtil.GetDragAndDropObjects(draggedItem.id, draggedItemIDs);
     DragAndDrop.paths            = ProjectWindowUtil.GetDragAndDropPaths(draggedItem.id, draggedItemIDs);
     if (DragAndDrop.objectReferences.Length > 1)
     {
         DragAndDrop.StartDrag("<Multiple>");
     }
     else
     {
         DragAndDrop.StartDrag(ObjectNames.GetDragAndDropTitle(InternalEditorUtility.GetObjectFromInstanceID(draggedItem.id)));
     }
     if (base.m_TreeView.data is GameObjectTreeViewDataSource)
     {
         ((GameObjectTreeViewDataSource)base.m_TreeView.data).SetupChildParentReferencesIfNeeded();
     }
 }