feat: integrate composable Godot runtime and EventBus debugger

This commit is contained in:
cneicy committed 2026-11-06 19:18:54 +08:00
1 parent 0d9e04c09d
commit 51f8a1d044
55 files changed
+1481 -114

No files matched your search

+9 -9
View File
@@ -1,6 +1,6 @@
# ShrinkSDK Workspace
ShrinkSDK 是一组可独立组合的 Unity / Godot C# 运行时模块。共享内核以 `netstandard2.1` 为最低目标;Unity 侧支持 Unity 2022.3,Godot 侧首期支持 Godot 4.6.3 Mono 和桌面平台。
ShrinkSDK 是一组可独立组合的 Unity / Godot C# 运行时模块。共享内核以 `netstandard2.1` 为最低目标;Unity 侧支持 Unity 2022.3,Godot 侧首期支持 Godot 4.7.2 Mono 和桌面平台。Godot 可选集成 `ShrinkSDK.EntJoy.Godot`,提供 EntJoy headless ECS/JobSystem 的节点生命周期接入。
Workspace 用于跨包集成、Unity 场景验证、Godot 消费者验证和 CodeGen 织入测试。每个 `Assets/Modules/<Module>` 是独立公开仓库的 Git submodule;根仓库保留相邻 `.meta`,不要删除或重新生成这些文件。
@@ -47,7 +47,7 @@ https://git.crash.work/ShrinkSDK/Installer.git#main
}
],
"dependencies": {
"com.cneicy.shrink-app-starter-basic": "0.3.0"
"com.cneicy.shrink-app-starter-basic": "0.4.1"
}
}
```
@@ -55,7 +55,7 @@ https://git.crash.work/ShrinkSDK/Installer.git#main
如果项目已经有 `scopedRegistries` 或 `dependencies`,只合并对应条目,不要覆盖原有配置。Git 安装同样建议固定 tag,例如:
```text
https://git.crash.work/ShrinkSDK/ShrinkEventBus.git#v2.1.0
https://git.crash.work/ShrinkSDK/ShrinkEventBus.git#v2.3.1
```
### 快速开始
@@ -64,9 +64,9 @@ https://git.crash.work/ShrinkSDK/ShrinkEventBus.git#v2.1.0
EventBus、Command、Network 和 App 的特性注册由 Unity ILPostProcessor 在编译期织入,不需要运行时反射扫描或手工维护注册表。修改带 ShrinkSDK 特性的代码后,等待 Unity 完成重新编译,再进入 Play Mode。
## Godot 4.6 C# 安装与使用
## Godot 4.7 C# 安装与使用
Godot 项目需要 Godot 4.6.3 Mono 和 .NET 8 SDK。使用现有 Workspace 验证时,直接用 Godot 打开:
Godot 项目需要 Godot 4.7.2 Mono 和 .NET 8 SDK。使用现有 Workspace 验证时,直接用 Godot 打开:
```text
Godot/Samples/ShrinkSDK.Godot.Sample/project.godot
@@ -87,9 +87,9 @@ Godot/Samples/ShrinkSDK.Godot.Sample/project.godot
然后为 Godot 的 `.csproj` 安装宿主和需要的模块,例如:
```powershell
dotnet add package ShrinkSDK.Godot --version 0.1.0
dotnet add package ShrinkSDK.App.Starter.Basic --version 0.3.0
dotnet add package ShrinkSDK.EventBus --version 2.1.0
dotnet add package ShrinkSDK.Godot --version 0.2.1
dotnet add package ShrinkSDK.App.Starter.Basic --version 0.4.1
dotnet add package ShrinkSDK.EventBus --version 2.3.1
dotnet restore
dotnet build
```
@@ -118,7 +118,7 @@ public partial class GameRoot : ShrinkGodotHost
}
```
`ShrinkGodotHost` 在 `_Ready` 中安装平台服务,在 `_Process` 中泵送主线程和网络队列,并转发暂停、恢复与退出生命周期。Godot Installer 插件的安装、包管理面板、CodeGen 状态和命令行验证方式见 [Godot/README.md](Godot/README.md)。
`ShrinkGodotHost` 在 `_Ready` 中安装平台服务,在帧边界泵送主线程和网络队列,并转发暂停、恢复与退出生命周期。`ShutdownAppAsync()` 只停止 App,`ShutdownAsync()` 关闭整个运行时。Godot Installer 插件的安装、包管理面板、CodeGen 状态和命令行验证方式见 [Godot/README.md](Godot/README.md)。
## 开发与发布