feat(eventbus): add platform runtimes and benchmarks
Add the Entities NativeQueue adapter, standalone .NET runtime and source generator, reproducible smoke coverage, and Unity benchmark assets for EventBus 2.0.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
# ShrinkEventBus Entities
|
||||
|
||||
`com.cneicy.shrink-eventbus-entities` 是可选 ECS/Burst 适配包。它不创建第二套事件总线,而是让 Burst Job 把 `unmanaged IShrinkEvent` 写入 `NativeQueue<T>`,随后由主线程或 ECS playback system 发布到指定的 `IShrinkEventBus`。
|
||||
|
||||
```csharp
|
||||
using var queue = new ShrinkEcsEventQueue<MyEcsEvent>();
|
||||
var writer = queue.Writer;
|
||||
|
||||
// Burst Job 中:writer.Post(in eventData);
|
||||
// Playback 阶段:
|
||||
queue.Playback(worldBus);
|
||||
```
|
||||
|
||||
限制:Burst 端只负责事实事件生产,不能直接执行托管 handler、UniTask、取消或结果裁决。
|
||||
Reference in New Issue
Block a user