feat: Addressables rules/sync tools, UI fixes, AddressKeys update
- Add AddressableRules.cs: single source of truth for prefix->group and prefix->label rules - Add AddressableRuleSyncWindow.cs: scan/fix/export-CSV tool (BaseGames > Addressables > Rule Sync) - AddressableBatchTool.cs: delegate DeriveGroupName to AddressableRules, remove duplicate PrefixGroupMap - AddressKeys.cs: add Labels constants (Preload, Poolable, Enemy, BGM, SFX, Charms, Config, Weapon) - Docs/Standards/AddressablesLabelSpec.md: new label naming & assignment spec - Docs/Standards/AssetFolderSpec.md: update Addressables group strategy section - SplashScreenController.cs: fix MainMenu loading flow - BootFlowSetupWizard.cs / SceneScaffoldTools.cs: scene scaffold fixes - PlayerInputActions: set UI/Point to Pass-Through type - Persistent.unity: add BootSequencer to auto-load MainMenu on play - EditorBuildSettings.asset: register scenes for build Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -40,18 +40,7 @@ namespace BaseGames.Editor
|
||||
private bool _autoGroupByPrefix = true; // 按 Key 前缀自动选/建分组
|
||||
|
||||
// Key 前缀 → 分组名称映射(Tab ① 自动分组用)
|
||||
private static readonly (string Prefix, string GroupName)[] PrefixGroupMap =
|
||||
{
|
||||
("Scene_", "Scenes"),
|
||||
("PLY_", "Player"),
|
||||
("ENM_", "Enemies"),
|
||||
("PROJ_", "Projectiles"),
|
||||
("VFX_", "VFX"),
|
||||
("UI_", "UI"),
|
||||
("COL_", "Collectibles"),
|
||||
("WPN_", "Weapons"),
|
||||
("Config/", "Config"),
|
||||
};
|
||||
// 规范数据统一来自 AddressableRules,此处不再声明本地副本。
|
||||
|
||||
// Tab ②
|
||||
private DefaultAsset _folderAsset;
|
||||
@@ -743,12 +732,7 @@ namespace BaseGames.Editor
|
||||
|
||||
/// <summary>根据 AddressKey 前缀返回建议分组名,未匹配时返回 null(回退到手动选定分组)。</summary>
|
||||
private static string DeriveGroupName(string key)
|
||||
{
|
||||
foreach (var (prefix, groupName) in PrefixGroupMap)
|
||||
if (key.StartsWith(prefix, StringComparison.Ordinal))
|
||||
return groupName;
|
||||
return null;
|
||||
}
|
||||
=> AddressableRules.GetExpectedGroup(key);
|
||||
|
||||
private static bool ExactNameMatch(string assetPath, string searchName)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user