20 lines
1.0 KiB
Markdown
20 lines
1.0 KiB
Markdown
# ShrinkSDK.Godot
|
||
|
||
Godot 4.7 C# 宿主与平台服务适配包。
|
||
|
||
```powershell
|
||
dotnet add package ShrinkSDK.Godot --version 0.2.1
|
||
```
|
||
|
||
主场景根节点继承 `ShrinkGodotHost`,在 `_Ready` 中先调用 `base._Ready()`,再调用 `StartAppAsync()`。`Runtime` 属性暴露 `ShrinkGodotRuntime`,可在非节点入口中复用同一套平台服务、派发队列和网络泵。`ShutdownAppAsync()` 只停止 App;`ShutdownAsync()` 关闭整个运行时。CodeGen 由依赖模块的 `buildTransitive` 自动启用。
|
||
|
||
## 可复用能力
|
||
|
||
<!-- shrink:capabilities -->
|
||
Capability: Godot 宿主生命周期、主线程派发与网络每帧处理预算
|
||
Aliases: Godot 主线程 派发 队列 预算
|
||
Limits: Godot C# 需要 .NET SDK;Unity 编译输入不包含此宿主,符号查询使用 --project Godot/Packages/ShrinkSDK.Godot/ShrinkSDK.Godot.csproj
|
||
Extension: ShrinkGodotRuntime 与 ShrinkGodotHost.NetworkDispatchBudgetPerFrame、TryPost
|
||
Evidence: [ShrinkGodotRuntime](ShrinkGodotRuntime.cs); [ShrinkGodotHost](ShrinkGodotHost.cs)
|
||
<!-- /shrink:capabilities -->
|