From 77065b6c179d8a924c3cdaed751be9f5c502a70a Mon Sep 17 00:00:00 2001 From: GwWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Wed, 17 Dec 2025 21:25:03 +0800 Subject: [PATCH] =?UTF-8?q?refactor(core):=20=E8=B0=83=E6=95=B4=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=B3=A8=E5=86=8C=E6=97=B6=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将资源注册逻辑移至架构初始化事件监听器内部 - 确保资源在系统完全初始化后再进行注册 - 优化资源预加载流程的执行顺序 --- GFramework.Core.Godot/system/AbstractResourceFactorySystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GFramework.Core.Godot/system/AbstractResourceFactorySystem.cs b/GFramework.Core.Godot/system/AbstractResourceFactorySystem.cs index a3a1b69..9dcd006 100644 --- a/GFramework.Core.Godot/system/AbstractResourceFactorySystem.cs +++ b/GFramework.Core.Godot/system/AbstractResourceFactorySystem.cs @@ -26,11 +26,11 @@ public abstract class AbstractResourceFactorySystem : AbstractSystem, IResourceF _registry = new ResourceFactory.Registry(); _resourceLoadSystem = this.GetSystem(); _assetCatalogSystem = this.GetSystem(); - // 注册资源 - RegisterResources(); // 监听架构初始化事件 this.RegisterEvent(_ => { + // 注册资源 + RegisterResources(); // 预加载所有资源 _registry.PreloadAll(); });