feat: integrate composable Godot runtime and EventBus debugger
This commit is contained in:
55 files changed
+1481
-114
No files matched your search
@@ -0,0 +1,41 @@
|
||||
# ShrinkSDK.EventBus.Godot
|
||||
|
||||
Godot 4.7 编辑器调试窗口,用于查看 ShrinkSDK.EventBus 的订阅快照和实时分发结果。
|
||||
|
||||
## 安装
|
||||
|
||||
```powershell
|
||||
dotnet add package ShrinkSDK.EventBus.Godot --version 0.1.1
|
||||
```
|
||||
|
||||
取得包后,将:
|
||||
|
||||
```text
|
||||
contentFiles/any/any/addons/shrink_event_bus
|
||||
```
|
||||
|
||||
复制到 Godot 项目的:
|
||||
|
||||
```text
|
||||
addons/shrink_event_bus
|
||||
```
|
||||
|
||||
然后在 `Project > Project Settings > Plugins` 启用 **ShrinkEventBus**。包依赖 `ShrinkSDK.EventBus 2.3.1` 与 `GodotSharp 4.7.2`;在 Debug 构建中把 `ShrinkEventBusDebugger` 挂到常驻节点(例如主场景根节点)。
|
||||
|
||||
## 使用
|
||||
|
||||
运行项目后打开底部调试器的 `ShrinkEventBus` 标签页。点击“刷新快照”查看订阅,勾选“启用实时记录”采集后续分发。每个调试会话独立显示数据。
|
||||
|
||||
插件通过 `shrink_event_bus:state` 调试消息接收数据。每 250 ms 最多发送一次快照,保留最近 200 条,不保留事件对象。关闭记录会解除诊断订阅,停止游戏保留最后一份可查看的数据。Release 构建不包含采集实现。
|
||||
|
||||
诊断数据来自公开的 `EventBus.ObserveDiagnostics` 与 `ShrinkEventDiagnostic`,不依赖反射或内部事件。
|
||||
|
||||
## 可复用能力
|
||||
|
||||
<!-- shrink:capabilities -->
|
||||
Capability: Godot 编辑器中查看事件总线订阅快照与实时分发日志,按事件或 Bus 搜索并筛选处理状态
|
||||
Aliases: 事件 事件总线 可视化 调试 窗口 订阅 EventBus debugger
|
||||
Limits: 需要 Debug 构建和 Godot 调试连接;订阅快照仅列出静态 EventBus 管理的 Bus;诊断记录可包含独立 Host 的分发;无事件参数和发送者对象;最多保留 200 条记录
|
||||
Extension: editor/event_bus_debugger_panel.gd 的界面;ShrinkEventBusDebugger.cs 的诊断协议适配
|
||||
Evidence: [采集桥接](addons/shrink_event_bus/ShrinkEventBusDebugger.cs); [会话插件](addons/shrink_event_bus/editor/event_bus_debugger_plugin.gd); [窗口](addons/shrink_event_bus/editor/event_bus_debugger_panel.gd)
|
||||
<!-- /shrink:capabilities -->
|
||||
Reference in new issue
Block a user