public static IsFolder ( int instanceID ) : bool | ||
instanceID | int | |
Résultat | bool |
internal static void StartDrag(int draggedInstanceID, List <int> selectedInstanceIDs) { DragAndDrop.PrepareStartDrag(); string title = string.Empty; if (ProjectWindowUtil.IsFavoritesItem(draggedInstanceID)) { DragAndDrop.SetGenericData(ProjectWindowUtil.k_DraggingFavoriteGenericData, (object)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 ? (object)string.Empty : (object)"isFolder"); string[] dragAndDropPaths = ProjectWindowUtil.GetDragAndDropPaths(draggedInstanceID, selectedInstanceIDs); if (dragAndDropPaths.Length > 0) { DragAndDrop.paths = dragAndDropPaths; } title = DragAndDrop.objectReferences.Length <= 1 ? ObjectNames.GetDragAndDropTitle(InternalEditorUtility.GetObjectFromInstanceID(draggedInstanceID)) : "<Multiple>"; } DragAndDrop.StartDrag(title); }