docs: audit and fix standards docs inconsistencies (v1.2)

AssetFolderSpec.md:
- §8.1: Enemies_{Region} → Enemies (match AddressableRules.cs single group)
- §8.4: fix old menu paths (Tools/Verification → Addressables)
- §10.3: fix Skill SO path (Data/Player/Skills → Data/Progression/Skills)
- §10.4: Charm workflow — remove 'bypass editor tools' recommendation
- §3.2: add SPL_ prefix for SpellSO
- Bump to v1.2

AddressablesLabelSpec.md:
- §6 step 7: fix old Verification menu path
- §7.2/7.3/7.4: unify menu notation (→ to /) and fix old Tools/Verification paths
- Bump to v1.2

AddressKeys.cs:
- Remove duplicate <summary> XML doc comment in Labels class

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-05-20 13:32:26 +08:00
parent 82ce9ff09a
commit b5c852f5e4
5 changed files with 87 additions and 25 deletions

View File

@@ -1,6 +1,6 @@
# Addressables Label标签命名与使用规范
> **版本**1.1
> **版本**1.2
> **创建日期**2026-05
> **适用范围**`Assets/_Game/` 目录下所有注册到 Addressables 的资产
> **关联文档**`Standards/AssetFolderSpec.md §8`、`Scripts/Core/Assets/AddressKeys.cs`、`Scripts/Editor/Addressables/AddressableRules.cs`
@@ -261,7 +261,7 @@ await Addressables.DownloadDependenciesAsync("Preload", false);
4. 在本文档 §2 Label 清单中追加说明行
5. 在本文档 §3 对应资产类型的表格中标注
6. 运行 Rule Sync菜单 BaseGames → Addressables → Rule SyncScan 验证无遗漏
7. 运行 AddressKeyValidator菜单 BaseGames → Verification → Validate Address Keys确认
7. 运行 AddressKeyValidator菜单 `BaseGames/Addressables/Validate Address Keys`)确认
```
---
@@ -286,7 +286,7 @@ Assets/_Game/Scripts/Editor/Addressables/AddressableRules.cs
```
新建/更新资产后:
1. 打开 Rule Sync 窗口(菜单 BaseGamesAddressablesRule Sync
1. 打开 Rule Sync 窗口(菜单 `BaseGames/Addressables/Rule Sync`
2. 点击 [Scan All] — 扫描所有 Addressable 条目与期望规则的差异
3. 查看报告:
- Group Mismatch — 资产在错误的分组
@@ -301,7 +301,7 @@ Assets/_Game/Scripts/Editor/Addressables/AddressableRules.cs
```
1. 将资产按命名前缀放置到正确目录(见 AssetFolderSpec.md §2§4
2. 打开 Addressable Batch Tool菜单 BaseGames → Tools → Addressable Batch Tool
2. 打开 Addressable Batch Tool菜单 `BaseGames/Addressables/Addressable Batch Tool`
3. 切换到 "② 文件夹批量" 标签,选择目标文件夹,点击 [Register Folder]
4. 切换到 "① 同步 AddressKeys" 标签,点击 [Scan],为新注册的资产补充 AddressKeys.cs 常量
5. 返回 Rule Sync 窗口执行 Scan → Fix All 统一校正 Group / Label
@@ -312,6 +312,6 @@ Assets/_Game/Scripts/Editor/Addressables/AddressableRules.cs
| 工具 | 菜单路径 | 核心功能 |
|------|---------|---------|
| **Rule Sync** | `BaseGamesAddressablesRule Sync` | 扫描 + 修复分组/标签不合规条目;导出 CSV |
| **Addressable Batch Tool** | `BaseGames → Tools → Addressable Batch Tool` | 三标签AddressKeys 同步 / 文件夹批量注册 / Selection 注册 |
| **Validate Address Keys** | `BaseGames → Verification → Validate Address Keys` | 验证 AddressKeys.cs 所有常量均已在 Addressables 注册,构建前自动触发 |
| **Rule Sync** | `BaseGames/Addressables/Rule Sync` | 扫描 + 修复分组/标签不合规条目;导出 CSV |
| **Addressable Batch Tool** | `BaseGames/Addressables/Addressable Batch Tool` | 三标签AddressKeys 同步 / 文件夹批量注册 / Selection 注册 |
| **Validate Address Keys** | `BaseGames/Addressables/Validate Address Keys` | 验证 AddressKeys.cs 所有常量均已在 Addressables 注册,构建前自动触发 |

View File

@@ -1,6 +1,6 @@
# 资源文件夹目录规划与管理规范
> **版本**1.1
> **版本**1.2
> **创建日期**2026-05
> **适用范围**`Assets/` 目录下所有非代码资源(美术、数据、预制体、场景等)
> **资源管理系统**Unity Addressables禁止使用 `Resources.Load`
@@ -274,6 +274,7 @@ Data/
| `ENM_` | 敌人 | `ENM_E001_Stats.asset` |
| `WPN_` | 武器 | `WPN_SkyBlade.asset` |
| `SKL_` | 技能/法术 | `SKL_SoulBlade.asset` |
| `SPL_` | 法术Spell | `SPL_Fireball.asset` |
| `CHM_` | 护身符 | `CHM_GhostMantis.asset` |
| `SHP_` | 商店 | `SHP_Inventory_Forest.asset` |
| `MAP_` | 地图 | `MAP_RoomData_Forest_01.asset` |
@@ -472,7 +473,7 @@ UI Toolkit/
| `VFX_Common` | 通用高频特效HitSpark、BloodSplat 等) | Local | 启动时预加载 |
| `Collectibles` | 收集物 PrefabGeo、Item、HPOrb | Local | 启动时预加载 |
| `Projectiles` | 抛射物 Prefab | Local | 启动时预加载 |
| `Enemies_{Region}` | 该区域的敌人 Prefab | Local | 进入区域时加载 |
| `Enemies` | 所有敌人 Prefab`ENM_*` | Local | 进入区域时加载 |
| `Room_{Region}` | 该区域的关卡场景 + 区域专属资产 | Local | 进入区域时加载 |
| `Boss_{Name}` | Boss 专属 Prefab + 场景 | Local | Boss 战开始前加载 |
| `Audio_Music` | BGM 音频FMOD bank 引用) | Remote可选| 按需流式加载 |
@@ -538,11 +539,11 @@ Config/DifficultyEasy
```
1. 在 Project 中创建/导入资产
2. 在 AddressKeys.cs 中添加对应 const 字符串
3. 在 AddressableBatchTool菜单 BaseGames → Tools → Addressable Batch Tool
3. 在 AddressableBatchTool菜单 `BaseGames/Addressables/Addressable Batch Tool`)中:
a. 切换到 "① 同步 AddressKeys" 标签
b. 点击 "Scan" 找到未注册的 Key
c. 选择目标 Group点击 "Register" 完成注册
4. 运行 AddressKeyValidator菜单 BaseGames → Verification → Validate Address Keys
4. 运行 AddressKeyValidator菜单 `BaseGames/Addressables/Validate Address Keys`
确认无 Missing / Mismatch 警告
5. 提交 AddressKeys.cs 和 AddressableAssetSettings.asset 的修改
```
@@ -683,7 +684,7 @@ var (prefab, _) = await AssetLoader.LoadAsync<GameObject>(AddressKeys.PrefabPlay
```
1. 在 _Game/Art/Characters/Player/{FormID}/Animations/ 下创建技能动画片段(.anim
2. 在 Skill Editor菜单 BaseGames/Data/Skill Editor左栏 [New] 创建 SKL_{SkillID}_Data.asset
- 路径_Game/Data/Player/Skills/SKL_{SkillID}_Data.asset
- 路径:`_Game/Data/Progression/Skills/SKL_{SkillID}_Data.asset`
- 命名SKL_{SkillID}示例SKL_DashSlash、SKL_SpiritWave
3. 使用 Skill HitBox Wizard菜单 BaseGames/Create/Skill HitBox Prefab生成
_Game/Prefabs/Skills/SKL_{SkillID}_HitBox.prefab支持多段伤害配置
@@ -693,10 +694,11 @@ var (prefab, _) = await AssetLoader.LoadAsync<GameObject>(AddressKeys.PrefabPlay
### 10.4 新增护身符Charm
> **推荐工具**:直接在 Project 窗口 Create → 对应 CharmSO然后通过 CharmSOEditorCustom Inspector配置效果类型与参数
> **推荐工具**`BaseGames → Data → Character Wizard`(切换到 Charm 标签)或直接在 Project 窗口 右键 → Create,使用 `CharmSOEditor`Custom Inspector配置**必须确保路径为 `_Game/Data/Progression/Charms/`,命名为 `CHM_{Name}.asset`**;若护身符类型较多,建议在 §12 中增加专属 Charm Editor 入口以强制规范
```
1. 在 _Game/Data/Progression/Charms/ 下创建 CHM_{Name}.assetCharmSO
1. 使用 Character Wizard菜单 BaseGames/Data/Character Wizard → Charm 标签)创建 CHM_{Name}.asset
- 路径_Game/Data/Progression/Charms/CHM_{Name}.asset
- 命名CHM_{Name}示例CHM_SoulReaper、CHM_IronSkin
2. 在 Inspector 中通过 CharmSOEditor 下拉选择效果类型并配置参数
3. 在 AddressKeys.cs 中添加 DataCharm{Name} 常量