DuplicateSelectedAssets() static private method

static private DuplicateSelectedAssets ( ) : void
return void
示例#1
0
 private void HandleCommandEvents(int treeViewKeyboardControlID)
 {
     if (GUIUtility.keyboardControl == treeViewKeyboardControlID)
     {
         EventType type = Event.current.type;
         switch (type)
         {
         case EventType.ExecuteCommand:
         case EventType.ValidateCommand:
         {
             bool flag = type == EventType.ExecuteCommand;
             if ((Event.current.commandName == "Delete") || (Event.current.commandName == "SoftDelete"))
             {
                 Event.current.Use();
                 if (flag)
                 {
                     ProjectBrowser.DeleteSelectedAssets(true);
                 }
             }
             else if (Event.current.commandName == "Duplicate")
             {
                 Event.current.Use();
                 if (flag)
                 {
                     ProjectWindowUtil.DuplicateSelectedAssets();
                 }
             }
             break;
         }
         }
     }
 }
示例#2
0
        private void HandleCommandEvents(int treeViewKeyboardControlID)
        {
            if (GUIUtility.keyboardControl != treeViewKeyboardControlID)
            {
                return;
            }
            EventType type = Event.current.type;

            if (type == EventType.ExecuteCommand || type == EventType.ValidateCommand)
            {
                bool flag = type == EventType.ExecuteCommand;
                if (Event.current.commandName == "Delete" || Event.current.commandName == "SoftDelete")
                {
                    Event.current.Use();
                    if (flag)
                    {
                        ProjectBrowser.DeleteSelectedAssets(true);
                    }
                }
                else if (Event.current.commandName == "Duplicate")
                {
                    Event.current.Use();
                    if (flag)
                    {
                        ProjectWindowUtil.DuplicateSelectedAssets();
                    }
                }
            }
        }