Files
Workspace/Assets/Modules/ShrinkEventBus.Entities/README.md
T
cneicy 724e0bc8d8 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.
2026-08-26 01:17:39 +08:00

603 B

ShrinkEventBus Entities

com.cneicy.shrink-eventbus-entities 是可选 ECS/Burst 适配包。它不创建第二套事件总线,而是让 Burst Job 把 unmanaged IShrinkEvent 写入 NativeQueue<T>,随后由主线程或 ECS playback system 发布到指定的 IShrinkEventBus

using var queue = new ShrinkEcsEventQueue<MyEcsEvent>();
var writer = queue.Writer;

// Burst Job 中:writer.Post(in eventData);
// Playback 阶段:
queue.Playback(worldBus);

限制:Burst 端只负责事实事件生产,不能直接执行托管 handler、UniTask、取消或结果裁决。