浏览代码

MenuItem orders and grouping cleaned

All Create items in assets now appear at the top, and all tools are grouped under ChopChop menu item
/release
Ciro Continisio 4 年前
当前提交
5a595e86
共有 3 个文件被更改,包括 4 次插入4 次删除
  1. 2
      UOP1_Project/Assets/Scripts/Editor/ReplaceTool.cs
  2. 2
      UOP1_Project/Assets/Scripts/Editor/SceneSelector/SceneSelector.cs
  3. 4
      UOP1_Project/Assets/Scripts/StateMachine/Editor/Templates/ScriptTemplates.cs

2
UOP1_Project/Assets/Scripts/Editor/ReplaceTool.cs


}
// Register menu item to open Window
[MenuItem("Tools/Replace with Prefab")]
[MenuItem("ChopChop/Replace with Prefab")]
public static void ShowWindow()
{
var window = GetWindow<ReplaceTool>();

2
UOP1_Project/Assets/Scripts/Editor/SceneSelector/SceneSelector.cs


private List<Item> items => _storage.items;
private Dictionary<string, Item> itemsMap => _storage.itemsMap;
[MenuItem("Window/Scene Selector", false, 100)]
[MenuItem("ChopChop/Scene Selector")]
private static void Open()
{
GetWindow<SceneSelector>();

4
UOP1_Project/Assets/Scripts/StateMachine/Editor/Templates/ScriptTemplates.cs


{
private static readonly string _path = "Assets/Scripts/StateMachine/Editor/Templates";
[MenuItem("Assets/Create/State Machines/Action Script", priority = 20)]
[MenuItem("Assets/Create/State Machines/Action Script", false, 0)]
public static void CreateActionScript() =>
ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0,
ScriptableObject.CreateInstance<DoCreateStateMachineScriptAsset>(),

[MenuItem("Assets/Create/State Machines/Condition Script", priority = 20)]
[MenuItem("Assets/Create/State Machines/Condition Script", false, 0)]
public static void CreateConditionScript() =>
ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0,
ScriptableObject.CreateInstance<DoCreateStateMachineScriptAsset>(),

正在加载...
取消
保存