refactor(editor): reorganize Editor directory and unify menu hierarchy

File directory changes (mirror Scripts/ module structure):
- AbilityTypeDrawer.cs         → Equipment/
- CharacterWizardWindow.cs     → Character/
- FormEditorWindow.cs          → Player/
- GMToolWindow.cs              → Tools/
- SOManagerWindow.cs           → Tools/
- Map/MapRoomDataEditor.cs     → World/Map/
- Navigation/ (root)           → Enemies/Navigation/
- Achievements/                → Progression/

Menu hierarchy changes (BaseGames/ top-level):
- Data/: +Character Wizard (from Tools/), +Boss Skill Sequence (from Tools/)
- Addressables/: +Addressable Batch Tool, +Asset Reference Graph, +Validate Address Keys (from Tools/Verification/)
- Scene/Setup/: +Boot Flow Wizard, +Scaffold *, +Auto-Open Persistent (from Tools/)
- Scene/: +Camera Area Setup (from Camera/), +Bake All NavSurfaces (from Tools/)
- Events/: +Event Bus Monitor, +Event Chain Viewer, +Create/Reimport Event Channels (from Tools/)
- Tools/Validation/: +Validate All SOs, +Apply/Validate Script Order (from Tools/ flat)
- Tools/Maintenance/: +Missing Scripts/*, +Physics2D Layer Matrix/* (from Tools/ flat)

Result: BaseGames/Tools/ reduced from 16 flat items to 4 items + 2 submenus

Docs: update AssetFolderSpec §12 editor tool table with new menu paths

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-05-20 11:52:17 +08:00
parent 442d4c9cfc
commit 82ce9ff09a
38 changed files with 115 additions and 61 deletions

View File

@@ -34,7 +34,7 @@ namespace BaseGames.Editor
private static readonly Color ColMissing = new Color(0.95f, 0.55f, 0.10f, 0.80f); // 无效 Key不在 Addressables
private static readonly Color ColOk = new Color(0.20f, 0.75f, 0.30f, 0.80f); // 正常
[MenuItem("BaseGames/Tools/Asset Reference Graph")]
[MenuItem("BaseGames/Addressables/Asset Reference Graph")]
public static void OpenWindow()
{
var win = GetWindow<AddressReferenceGraphWindow>("Asset Reference Graph");

View File

@@ -25,7 +25,7 @@ namespace BaseGames.Editor
{
// ── 常量 ─────────────────────────────────────────────────────────────
private const string Title = "Addressable 批量工具";
private const string MenuPath = "BaseGames/Tools/Addressable Batch Tool";
private const string MenuPath = "BaseGames/Addressables/Addressable Batch Tool";
private const string PrefsKey = "AddressableBatch.";
// ── 状态 ─────────────────────────────────────────────────────────────
@@ -77,7 +77,7 @@ namespace BaseGames.Editor
// ─────────────────────────────────────────────────────────────────────
[MenuItem(MenuPath, priority = 200)]
[MenuItem("BaseGames/Verification/Open Addressable Batch Tool", priority = 250)]
[MenuItem("BaseGames/Addressables/Open Addressable Batch Tool", priority = 250)]
public static void OpenWindow()
{
var win = GetWindow<AddressableBatchTool>(Title);

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0547dd5099c322248a3a2652f4b01cc9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 195ffa39c13090d4e94d81ab10b6c721
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -42,7 +42,7 @@ namespace BaseGames.Editor
private readonly Dictionary<int, SerializedObject> _soCache = new Dictionary<int, SerializedObject>();
// ══ 菜单入口 ══════════════════════════════════════════════════════════
[MenuItem("BaseGames/Camera/Camera Area Setup", priority = 100)]
[MenuItem("BaseGames/Scene/Camera Area Setup", priority = 100)]
public static void ShowWindow()
{
var win = GetWindow<CameraAreaSetupTool>("Camera Area Setup");

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 07ed02361aa3739468cbd36457aecda6
guid: c58b8b4e1f9da6a42ac3d362d4bf4014
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -38,7 +38,7 @@ namespace BaseGames.Editor
private static StyleSheet Uss =>
_uss != null ? _uss : (_uss = AssetDatabase.LoadAssetAtPath<StyleSheet>(UssPath));
[MenuItem("BaseGames/Tools/Character Wizard", priority = 1)]
[MenuItem("BaseGames/Data/Character Wizard", priority = 1)]
public static void Open()
{
var wnd = GetWindow<CharacterWizardWindow>();

View File

@@ -39,7 +39,7 @@ namespace BaseGames.Editor
private static readonly Color ColDelay = new Color(0.25f, 0.25f, 0.30f, 0.50f);
private static readonly Color ColWarn = new Color(0.95f, 0.10f, 0.10f, 0.85f);
[MenuItem("BaseGames/Tools/Boss Skill Sequence Viewer")]
[MenuItem("BaseGames/Data/Boss Skill Sequence", priority = 110)]
public static void OpenWindow()
{
var win = GetWindow<BossSkillSequenceWindow>("Boss Skill Sequence");

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 763f62796f2f4ed43a21dfe3befb70a1
guid: f8e429c47dfa7fe4da6d9687c02398ea
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -18,7 +18,7 @@ namespace BaseGames.Editor
private static readonly PropertyInfo s_bakeJobProp =
typeof(NavSurface).GetProperty("BakeJob", BindingFlags.NonPublic | BindingFlags.Instance);
[MenuItem("BaseGames/Tools/Bake All NavSurfaces %#b", priority = 100)]
[MenuItem("BaseGames/Scene/Bake All NavSurfaces %#b", priority = 100)]
public static void BakeAll()
{
var surfaces = Object.FindObjectsByType<NavSurface>(FindObjectsSortMode.None);
@@ -42,7 +42,7 @@ namespace BaseGames.Editor
Debug.Log($"[NavSurfaceBake] 开始烘焙 {count} 个 NavSurface……");
}
[MenuItem("BaseGames/Tools/Bake All NavSurfaces %#b", validate = true)]
[MenuItem("BaseGames/Scene/Bake All NavSurfaces %#b", validate = true)]
private static bool BakeAllValidate()
{
// 仅在非 Play Mode 时可用NavSurface.Bake 仅支持编辑器模式)

View File

@@ -35,7 +35,7 @@ namespace BaseGames.Editor
private static readonly Color ColActive = new Color(0.95f, 0.60f, 0.10f, 0.80f);
private static readonly Color ColPending = new Color(0.70f, 0.70f, 0.75f, 0.80f);
[MenuItem("BaseGames/Tools/Event Chain Viewer")]
[MenuItem("BaseGames/Events/Event Chain Viewer")]
public static void OpenWindow()
{
var win = GetWindow<EventChainEditorWindow>("Event Chain Viewer");

View File

@@ -18,7 +18,7 @@ namespace BaseGames.Editor
{
private const string RootPath = "Assets/_Game/Data/Events";
[MenuItem("BaseGames/Tools/Create Event Channel Assets")]
[MenuItem("BaseGames/Events/Create Event Channels")]
public static void CreateAll()
{
// ── Core 原始类型频道 ──────────────────────────────────────────────
@@ -115,7 +115,7 @@ namespace BaseGames.Editor
Debug.Log("[CreateEventChannelAssets] 所有事件频道资产生成完毕。");
}
[MenuItem("BaseGames/Tools/Reimport Event Channel Assets")]
[MenuItem("BaseGames/Events/Reimport Event Channels")]
public static void ReimportAllEventAssets()
{
if (!AssetDatabase.IsValidFolder(RootPath))

View File

@@ -13,7 +13,7 @@ namespace BaseGames.Editor
private bool _autoScroll = true;
private Vector2 _scroll;
[MenuItem("BaseGames/Tools/Event Bus Monitor %#e")]
[MenuItem("BaseGames/Events/Event Bus Monitor %#e")]
public static void OpenWindow()
{
EventBusMonitorWindow window = GetWindow<EventBusMonitorWindow>("Event Bus Monitor");

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 89f2177f5a1c33044a6c38a2633f0ade
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 172d69bd8cc35c34197a1974bd9cc9c3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -51,7 +51,7 @@ namespace BaseGames.Editor
// ── 菜单入口 ──────────────────────────────────────────────────────────
[MenuItem("BaseGames/Tools/Boot Flow Wizard", priority = 10)]
[MenuItem("BaseGames/Scene/Setup/Boot Flow Wizard", priority = 10)]
public static void Open()
{
var wnd = GetWindow<BootFlowSetupWizard>();

View File

@@ -15,13 +15,13 @@ namespace BaseGames.Editor
/// 运行时Play Mode / 发行版 Build的保证由 GameBootstrapRuntime 程序集)负责,
/// 本脚本与 Play Mode 状态无关,不监听 playModeStateChanged。
///
/// 菜单BaseGames/Tools/Edit Mode: Auto-Open Persistent Scene
/// 菜单BaseGames/Scene/Setup/Auto-Open Persistent Scene
/// </summary>
[InitializeOnLoad]
public static class PersistentSceneAutoLoader
{
// ── 常量 ─────────────────────────────────────────────────────────────
private const string MenuPath = "BaseGames/Tools/Edit Mode: Auto-Open Persistent Scene";
private const string MenuPath = "BaseGames/Scene/Setup/Auto-Open Persistent Scene";
private const string PrefKey = "BaseGames_EditAutoOpen_Persistent";
private const string PersistentSceneName = "Scene_Persistent";

View File

@@ -26,7 +26,7 @@ namespace BaseGames.Editor
public static class SceneScaffoldTools
{
[MenuItem("BaseGames/Tools/Scaffold Persistent Scene")]
[MenuItem("BaseGames/Scene/Setup/Scaffold Persistent Scene")]
public static void ScaffoldPersistentScene()
{
var report = new List<string>();
@@ -235,7 +235,7 @@ namespace BaseGames.Editor
/// [MainMenu] → [Canvas_MainMenu] → 主按钮组 / SaveSlotPanel / SettingsPanel / CreditsPanel
/// 自动绑定所有已存在的相关事件频道 SO 资产。
/// </summary>
[MenuItem("BaseGames/Tools/Scaffold Main Menu Scene", priority = 202)]
[MenuItem("BaseGames/Scene/Setup/Scaffold Main Menu Scene", priority = 202)]
public static void ScaffoldMainMenuScene()
{
var report = new List<string>();
@@ -305,7 +305,7 @@ namespace BaseGames.Editor
/// [RoomRoot] → [Camera] / [SpawnPoints] / [Environment] / [Transitions]
/// 可配合 SceneObjectPlacerTool 在层级内快速追加更多对象。
/// </summary>
[MenuItem("BaseGames/Tools/Scaffold Game Room", priority = 201)]
[MenuItem("BaseGames/Scene/Setup/Scaffold Game Room", priority = 201)]
public static void ScaffoldGameRoom()
{
var report = new List<string>();

View File

@@ -15,7 +15,7 @@ namespace BaseGames.Editor
// 场景
// ──────────────────────────────────────────────
[MenuItem("BaseGames/Tools/Missing Scripts/Clear In Scene")]
[MenuItem("BaseGames/Tools/Maintenance/Missing Scripts/Clear In Scene")]
public static void ClearMissingScriptsInScene()
{
int totalRemoved = 0;
@@ -39,7 +39,7 @@ namespace BaseGames.Editor
Debug.Log($"[MissingScriptCleaner] 场景完成。共移除 {totalRemoved} 个丢失脚本,影响 {affected.Count} 个 GameObject。");
}
[MenuItem("BaseGames/Tools/Missing Scripts/Find In Scene")]
[MenuItem("BaseGames/Tools/Maintenance/Missing Scripts/Find In Scene")]
public static void FindMissingScriptsInScene()
{
int totalFound = 0;
@@ -67,7 +67,7 @@ namespace BaseGames.Editor
// Prefab 资产
// ──────────────────────────────────────────────
[MenuItem("BaseGames/Tools/Missing Scripts/Clear In All Prefabs")]
[MenuItem("BaseGames/Tools/Maintenance/Missing Scripts/Clear In All Prefabs")]
public static void ClearMissingScriptsInPrefabs()
{
int totalRemoved = 0;
@@ -107,7 +107,7 @@ namespace BaseGames.Editor
Debug.Log($"[MissingScriptCleaner] Prefab 完成。共移除 {totalRemoved} 个丢失脚本,影响 {affectedPrefabs} 个 Prefab。");
}
[MenuItem("BaseGames/Tools/Missing Scripts/Find In All Prefabs")]
[MenuItem("BaseGames/Tools/Maintenance/Missing Scripts/Find In All Prefabs")]
public static void FindMissingScriptsInPrefabs()
{
int totalFound = 0;

View File

@@ -54,14 +54,14 @@ namespace BaseGames.Editor
};
// ─────────────────────────────────────────────────────────────────────
[MenuItem("BaseGames/Tools/Physics2D Layer Matrix/Check", priority = 210)]
[MenuItem("BaseGames/Tools/Maintenance/Physics2D Layer Matrix/Check", priority = 210)]
public static void CheckAndPrintReport()
{
var results = Check();
PrintToConsole(results);
}
[MenuItem("BaseGames/Tools/Physics2D Layer Matrix/Auto Fix", priority = 211)]
[MenuItem("BaseGames/Tools/Maintenance/Physics2D Layer Matrix/Auto Fix", priority = 211)]
public static void FixAndReport()
{
var results = Check();

View File

@@ -31,7 +31,7 @@ namespace BaseGames.Editor
+ string.Join("\n", errors));
}
[MenuItem("BaseGames/Tools/Validate All ScriptableObjects")]
[MenuItem("BaseGames/Tools/Validation/Validate All ScriptableObjects")]
public static void ValidateMenu()
{
var (errors, warnings) = RunAll();

View File

@@ -32,7 +32,7 @@ namespace BaseGames.Editor
new OrderRule("PlayerController", -100),
};
[MenuItem("BaseGames/Tools/Apply Script Execution Order Preset")]
[MenuItem("BaseGames/Tools/Validation/Apply Script Execution Order Preset")]
public static void ApplyPreset()
{
int updated = 0;
@@ -69,7 +69,7 @@ namespace BaseGames.Editor
Debug.Log($"[ScriptExecutionOrderTools] 执行顺序预设应用完成。更新数量: {updated}。");
}
[MenuItem("BaseGames/Tools/Validate Script Execution Order Preset")]
[MenuItem("BaseGames/Tools/Validation/Validate Script Execution Order Preset")]
public static void ValidatePreset()
{
var mismatches = new List<string>();

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 08a52815a08c8c3428ccb6a530171ddd
guid: a1f0dd89654be0841be1adfcea426a67
folderAsset: yes
DefaultImporter:
externalObjects: {}