diff --git a/Packages/com.flowscope.gamecore/Documentation~/installation.md b/Packages/com.flowscope.gamecore/Documentation~/installation.md index 97da325..6479a04 100644 --- a/Packages/com.flowscope.gamecore/Documentation~/installation.md +++ b/Packages/com.flowscope.gamecore/Documentation~/installation.md @@ -2,18 +2,28 @@ ## Consumer Manifest -Add FlowScope and its Git-hosted R3 dependency to the consuming project's `Packages/manifest.json`: +Add FlowScope, R3.Unity, and the NuGet R3 core dependency to the consuming project's `Packages/manifest.json`: ```json { + "scopedRegistries": [ + { + "name": "Unity NuGet", + "url": "https://unitynuget-registry.openupm.com", + "scopes": [ + "org.nuget" + ] + } + ], "dependencies": { "com.cysharp.r3": "https://github.com/Cysharp/R3.git?path=src/R3.Unity/Assets/R3.Unity#1.3.0", - "com.flowscope.gamecore": "ssh://git@192.168.9.108:2222/Developer/BombGameFramework.git?path=/Packages/com.flowscope.gamecore#codex/pre-p2-architecture-fixes" + "com.flowscope.gamecore": "ssh://git@git.zz.com:2222/Developer/FlowScope.git?path=/Packages/com.flowscope.gamecore#v0.2.0-preview.1", + "org.nuget.r3": "1.3.0" } } ``` -Keep the R3 dependency in the project manifest. Unity Package Manager can install a Git package from the project manifest, but it does not support Git dependencies declared inside another package's `package.json`. +Keep both R3 entries in the project manifest. Unity Package Manager can install a Git package from the project manifest, but Git dependencies declared inside another package's `package.json` are not resolved reliably. `org.nuget.r3` supplies the core R3 and BCL DLLs required by `R3.Unity`. ## Validation @@ -23,5 +33,6 @@ After Unity resolves the package: 2. Open `Tools/FlowScope/Diagnostics`. 3. Confirm Addressables and UGUI dependencies are present. 4. Add a small probe script in the consuming project that references `FlowScope.Container.Container` and `FlowScope.Flow.GameFlow`. +5. Confirm the consuming project has zero compile errors and zero Console errors after package resolution. Do not copy `Assets/FlowScope` into the consuming project when testing the Git package path. That would validate project-internal source import rather than package consumption. diff --git a/Packages/com.flowscope.gamecore/README.md b/Packages/com.flowscope.gamecore/README.md index ad6355a..1b2e533 100644 --- a/Packages/com.flowscope.gamecore/README.md +++ b/Packages/com.flowscope.gamecore/README.md @@ -10,14 +10,24 @@ Add the package to the consuming project's `Packages/manifest.json`: ```json { + "scopedRegistries": [ + { + "name": "Unity NuGet", + "url": "https://unitynuget-registry.openupm.com", + "scopes": [ + "org.nuget" + ] + } + ], "dependencies": { "com.cysharp.r3": "https://github.com/Cysharp/R3.git?path=src/R3.Unity/Assets/R3.Unity#1.3.0", - "com.flowscope.gamecore": "ssh://git@192.168.9.108:2222/Developer/BombGameFramework.git?path=/Packages/com.flowscope.gamecore#codex/pre-p2-architecture-fixes" + "com.flowscope.gamecore": "ssh://git@git.zz.com:2222/Developer/FlowScope.git?path=/Packages/com.flowscope.gamecore#v0.2.0-preview.1", + "org.nuget.r3": "1.3.0" } } ``` -`com.cysharp.r3` must be declared by the consuming project because Unity Package Manager does not support Git dependencies inside a package's `package.json`. +`com.cysharp.r3` and `org.nuget.r3` must be declared by the consuming project. Unity Package Manager can install Git packages from the project manifest, but Git dependencies declared inside another package's `package.json` are not resolved reliably. `org.nuget.r3` supplies the core R3 and BCL DLLs required by `R3.Unity`. ## Assembly Boundaries @@ -26,4 +36,3 @@ Add the package to the consuming project's `Packages/manifest.json`: - `FlowScope.Editor` is Editor-only and only provides read-only diagnostics. Runtime must not depend on Addressables, Editor, Samples, or Tests. - diff --git a/docs/reviews/p2-phase2-package-preview-report.md b/docs/reviews/p2-phase2-package-preview-report.md new file mode 100644 index 0000000..297320a --- /dev/null +++ b/docs/reviews/p2-phase2-package-preview-report.md @@ -0,0 +1,59 @@ +# FlowScope P2 第二阶段 Package Preview 记录 + +日期:2026-06-04 + +## 本轮范围 + +本轮承接 P2 第一阶段后的 package 试迁移工作,重点不是改 Runtime API,而是把 FlowScope Git package 从“仓库内结构存在”推进到“真实消费方可用”的 preview 状态。 + +## 已完成事项 + +1. FlowScope package preview tag + - tag:`v0.2.0-preview.1` + - 提交:`31641b2c35d1d6c4f056772f144562007f0d0782` + - 远端:`ssh://git@git.zz.com:2222/Developer/FlowScope.git` + +2. 消费方 Git package 接入 + - 消费项目:`C:\Users\13999\Documents\FishingFrenzy\FishingFrenzy` + - package URL:`ssh://git@git.zz.com:2222/Developer/FlowScope.git?path=/Packages/com.flowscope.gamecore#v0.2.0-preview.1` + - R3 依赖:同时保留 `com.cysharp.r3` 与 `org.nuget.r3`。 + - Unity NuGet registry:`https://unitynuget-registry.openupm.com`,scope 为 `org.nuget`。 + +3. 最小消费方验证脚本 + - 文件:`FishingFrenzy/Assets/Scripts/FlowScopePackageSmokeProbe.cs` + - 覆盖:编译期引用 `FlowScope.Container.Container`、`FlowScope.Flow.GameFlow`、`FlowScope.Addressables.AddressablesResourceBackend` 与 `FlowScope.Resources.IResourceService`。 + - 运行方式:挂到临时 GameObject 后,通过组件右键菜单 `FlowScope/Validate Package References` 手动执行。 + - 设计边界:不自动挂场景、不自动启动、不加载真实业务资源,只证明消费方工程能引用 package API。 + +4. 消费方验证结果 + - UnitySkills `debug_check_compilation`:`isCompiling = false`,`isUpdating = false`。 + - UnitySkills `debug_get_errors`:`count = 0`。 + - UnitySkills `console_get_stats`:`errors = 0`。 + - UnitySkills `package_list`:可见 `com.flowscope.gamecore`,版本为 `0.2.0-preview.1`。 + +5. 安装文档同步 + - `Packages/com.flowscope.gamecore/README.md` + - `Packages/com.flowscope.gamecore/Documentation~/installation.md` + - 已改为正式 SSH URL、preview tag、Unity NuGet registry 和 `org.nuget.r3` 说明。 + +## 本轮踩坑记录 + +1. FlowScope remote 曾残留旧仓库地址 + - 本地 `origin` 一度指向旧的 `BombGameFramework` 地址。 + - 已改为 `ssh://git@git.zz.com:2222/Developer/FlowScope.git` 后再推送 tag。 + +2. R3 Git package 不等于完整 R3 依赖 + - `com.cysharp.r3` 提供 Unity 适配层。 + - `R3.dll` 与 BCL DLL 需要由 `org.nuget.r3` 及其 NuGet 传递依赖提供。 + +3. Git package 必须保留 Unity `.meta` + - preview tag 基于已补齐 package 顶层 `.meta` 的提交。 + - 缺少 `.meta` 时,消费方会出现 immutable package 相关导入错误。 + +## 剩余 P2 第二阶段事项 + +1. 当前 preview tag 已可被消费方解析,但 tag 内 package 文档仍是打 tag 当时的快照。后续如果要让 package 内文档也随 tag 发布,应在文档修正后创建下一个 preview tag。 +2. 还没有迁移 `Samples~/MainMenuP0`。 +3. 还没有迁移 package 内 `Tests`。 +4. Addressables 测试资源仍位于主项目测试目录,后续迁移 Tests 前需要统一 fixture 路径。 +5. 仍需在一个真正空白 Unity 项目中重复 Git package 接入;FishingFrenzy 是真实消费方,但不是空白项目。