Files
lms fc23b75e95 [docs][fix]: 统一通用框架分类并补录第三方插件到模块索引
- 通用框架分类由项目框架改为核心框架
- 模块索引补录第三方插件并校准各模块状态
- 项目规则入口声明核心规则完整定义
- 20/40 规则文档中重复 Git 规则改为链接引用

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 14:35:48 +08:00

70 lines
3.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 通用框架
## 分类
- 核心框架
## 目的
记录 general/shared 代码、生成框架、StrayFog 核心和跨模块通用能力。
## 已知线索
- General`Assets/Game/GameGeneralScripte/`
- 生成 General`Assets/AutoBuildScript/General/`
- StrayFog Core`Assets/StrayFog/Core/`
- 程序集:`GameGeneral``ZY.General.ZYCore``StrayFogCore`
## 当前结构
- `GameGeneralScripte/`:项目通用运行时代码,包含 `CopyToGeneral`、状态机扩展、`GameGeneral.asmdef``SEHFCommon.dll`
- `AutoBuildScript/General/`:生成框架的 General 层,包含 `ZYCore``ZYXlsx``ZYUGUI` 的通用模板和属性。
- `StrayFog/Core/`:底层核心程序集和模拟行为桥接,包含 `SFCore.dll``SFGlobalData``SFAssetUtility_Unity``SimulateBehaviour`
- `GameGeneralScripte/CopyToGeneral/AssetBundle/HFAssetBundleHelper.cs`资源路径、StreamingAssets、PersistentData、CDNAssets、微信小游戏文件读写适配。
- `GameGeneralScripte/CopyToGeneral/DllHelper/HFDllHelper.cs`Hotfix DLL、PDB、HybridCLR AOT DLL bytes 路径和读取。
- `GameGeneralScripte/CopyToGeneral/Enum/HFEnumForAssetBundle.cs`AssetBundle 加载/更新模式枚举。
- `GameGeneralScripte/StateMachineBehaviour/`Animator 状态机扩展和只读属性 Drawer。
## 边界判断
- `GameGeneralScripte` 更像项目运行时可依赖的通用层。
- `AutoBuildScript/General` 更像代码生成框架的通用模板层。
- `StrayFog/Core` 提供更底层的工具、全局路径和模拟行为桥接能力。
- 资源框架、配置框架、Hotfix 启动都会依赖这里的通用能力;反向依赖 hotfix 业务逻辑应避免。
## 梳理任务
- [x] 梳理 `GameGeneralScripte``AutoBuildScript/General` 的边界。
- [x] 梳理 StrayFog Core 提供的基础能力。
- [x] 梳理通用 attributes、enum、dll helper、asset bundle helper。
- [x] 梳理哪些功能/框架允许依赖 general/shared。
- [x] 梳理生成代码和手写代码的边界。
## 待确认
- `StrayFog` 是项目自研框架还是外部框架。
- `CopyToGeneral` 的复制/生成来源需要继续追 `AutoBuildScript` 配置。
- General 层建议保持底层通用,不依赖 hotfix 业务层。
## 相关模块
- [Hotfix 启动/目录](../Hotfix启动.md)
- [资源框架](../资源管理/README.md)
- [数据/配置框架](../数据配置框架.md)
---
## 文档关联
> 当本文档发生变更时,应同步检查以下关联文档,避免信息不一致。
| 文档 | 关联原因 |
|---|---|
| [modules/模块索引.md](../../模块索引.md) | 模块索引是项目知识总入口 |
| [modules/frameworks/数据配置框架.md](../数据配置框架.md) | 数据/配置框架 |
| [modules/frameworks/Hotfix启动.md](../Hotfix启动.md) | Hotfix 启动/目录 |
| [modules/frameworks/资源管理/README.md](../资源管理/README.md) | 资源框架 |
| [rules/10-架构说明.md](../../../rules/10-架构说明.md) | 架构说明定义总体分层和依赖方向 |
| [rules/20-开发规则.md](../../../rules/20-开发规则.md) | 开发规则与框架/生成规则互相引用 |
| [rules/30-模块登记规则.md](../../../rules/30-模块登记规则.md) | 模块登记规则定义分类和状态口径 |
| TODO补充依赖或使用本框架的模块文档 | 如依赖本框架的功能模块 |