Feature/physics and tilemap enhancement (#247)
* feat(behavior-tree,tilemap): 修复编辑器连线缩放问题并增强插件系统 * feat(node-editor,blueprint): 新增通用节点编辑器和蓝图可视化脚本系统 * feat(editor,tilemap): 优化编辑器UI样式和Tilemap编辑器功能 * fix: 修复CodeQL安全警告和CI类型检查错误 * fix: 修复CodeQL安全警告和CI类型检查错误 * fix: 修复CodeQL安全警告和CI类型检查错误
This commit is contained in:
@@ -150,6 +150,8 @@ class RuntimePluginManager {
|
||||
* 为场景创建系统
|
||||
*/
|
||||
createSystemsForScene(scene: IScene, context: SystemContext): void {
|
||||
// Phase 1: 创建所有系统
|
||||
// Phase 1: Create all systems
|
||||
for (const [id, plugin] of this.plugins) {
|
||||
if (!this.enabledPlugins.has(id)) continue;
|
||||
const runtimeModule = plugin.runtimeModule;
|
||||
@@ -161,6 +163,20 @@ class RuntimePluginManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Phase 2: 连接跨插件依赖
|
||||
// Phase 2: Wire cross-plugin dependencies
|
||||
for (const [id, plugin] of this.plugins) {
|
||||
if (!this.enabledPlugins.has(id)) continue;
|
||||
const runtimeModule = plugin.runtimeModule;
|
||||
if (runtimeModule?.onSystemsCreated) {
|
||||
try {
|
||||
runtimeModule.onSystemsCreated(scene, context);
|
||||
} catch (e) {
|
||||
console.error(`Failed to wire dependencies for ${id}:`, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user