From c8dc9869a3c4f0a56a8960109838ee37e2d945df Mon Sep 17 00:00:00 2001 From: yhh <359807859@qq.com> Date: Tue, 16 Dec 2025 11:08:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(runtime-core):=20=E4=BF=AE=E5=A4=8D=20Plugi?= =?UTF-8?q?nManager=20=E7=BB=84=E4=BB=B6=E6=B3=A8=E5=86=8C=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 ComponentRegistry 类改为 GlobalComponentRegistry 实例: - registerComponents() 期望 IComponentRegistry 接口实例 - GlobalComponentRegistry 是 ComponentRegistry 的全局实例 --- packages/runtime-core/src/PluginManager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/src/PluginManager.ts b/packages/runtime-core/src/PluginManager.ts index ea1b1117..b7b39b95 100644 --- a/packages/runtime-core/src/PluginManager.ts +++ b/packages/runtime-core/src/PluginManager.ts @@ -3,7 +3,7 @@ * 运行时插件管理器 */ -import { ComponentRegistry, ServiceContainer } from '@esengine/ecs-framework'; +import { GlobalComponentRegistry, ServiceContainer } from '@esengine/ecs-framework'; import type { IScene } from '@esengine/ecs-framework'; import type { IRuntimePlugin, IRuntimeModule, SystemContext, ModuleManifest } from '@esengine/engine-core'; @@ -60,7 +60,7 @@ export class RuntimePluginManager { const mod = plugin.runtimeModule; if (mod?.registerComponents) { try { - mod.registerComponents(ComponentRegistry); + mod.registerComponents(GlobalComponentRegistry); } catch (e) { console.error(`[PluginManager] Failed to register components for ${id}:`, e); }