Files
UnityAI/modules/frameworks/通用框架/README.md
lms ee1ff7f444 [docs][refactor]: 将旧 01~06 中文教程合并整理为 modules/frameworks 文件夹结构
- 删除 01~05 旧中文教程目录
- 将 03 核心功能教程拆分为各 framework 模块的子文档
- 06 工具脚本移入 modules/frameworks/编辑器工具/UI工具/
- 非框架内容合并进 rules/20-开发规则.md 与 rules/40-工作流清单.md
- 更新所有交叉链接与文档关联表

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

70 lines
3.3 KiB
Markdown
Raw 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补充依赖或使用本框架的模块文档 | 如依赖本框架的功能模块 |