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; } } } }
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(); } } } }