feat(sdk): migrate to EventBus 2.0

Replace the legacy EventBase runtime with generated multi-bus bindings and explicit scheduling. Migrate app, data, network, demo, and mod consumers; add generated network-event registration and owner-scoped mod content overrides.
This commit is contained in:
2026-08-26 01:15:48 +08:00
parent 67d32795c4
commit ad5a7b68a3
129 changed files with 5071 additions and 5584 deletions
@@ -54,7 +54,7 @@ namespace ShrinkApp
{
HasFailed = true;
LastError = ex.Message;
EventBus.TriggerEvent(new ShrinkAppStartFailedEvent
EventBus.Post(new ShrinkAppStartFailedEvent
{
ErrorMessage = ex.Message,
FailedModuleId = _startedModules.LastOrDefault() ?? string.Empty
@@ -75,7 +75,7 @@ namespace ShrinkApp
return;
_publishedStartedEvent = true;
EventBus.TriggerEvent(new ShrinkAppStartedEvent
EventBus.Post(new ShrinkAppStartedEvent
{
ModuleIds = _startedModules.ToArray()
});
@@ -168,12 +168,12 @@ namespace ShrinkApp
public ShrinkAppHostingMode hostingMode = ShrinkAppHostingMode.ClassicHost;
}
public sealed class ShrinkAppStartedEvent : EventBase
public sealed class ShrinkAppStartedEvent : IShrinkEvent
{
public IReadOnlyList<string> ModuleIds { get; set; } = Array.Empty<string>();
}
public sealed class ShrinkAppStartFailedEvent : EventBase
public sealed class ShrinkAppStartFailedEvent : IShrinkEvent
{
public string ErrorMessage { get; set; } = string.Empty;
public string FailedModuleId { get; set; } = string.Empty;
+1 -1
View File
@@ -5,7 +5,7 @@
"description": "Shrink 系列统一宿主层,提供模块安装器、服务容器与统一启动流程。",
"unity": "2022.3",
"dependencies": {
"com.cneicy.shrink-eventbus": "1.3.0",
"com.cneicy.shrink-eventbus": "2.0.0",
"com.cneicy.shrink-shared-codegen": "0.1.0",
"com.cysharp.unitask": "2.5.10"
},