From f785264873688a6bd51c33a7af2fcd44b85b5942 Mon Sep 17 00:00:00 2001 From: ALEXTANG <574809918@qq.com> Date: Sat, 24 Aug 2024 21:02:12 +0800 Subject: [PATCH] =?UTF-8?q?#94=20=E8=B5=84=E6=BA=90=E5=8A=A0=E8=BD=BDasset?= =?UTF-8?q?LoadingList=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #94 资源加载assetLoadingList处理 --- .../Runtime/Modules/ResourceModule/ResourceManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UnityProject/Assets/TEngine/Runtime/Modules/ResourceModule/ResourceManager.cs b/UnityProject/Assets/TEngine/Runtime/Modules/ResourceModule/ResourceManager.cs index 7b87d207..451f303d 100644 --- a/UnityProject/Assets/TEngine/Runtime/Modules/ResourceModule/ResourceManager.cs +++ b/UnityProject/Assets/TEngine/Runtime/Modules/ResourceModule/ResourceManager.cs @@ -659,6 +659,7 @@ namespace TEngine if (cancelOrFailed) { + _assetLoadingList.Remove(assetObjectKey); return null; } @@ -696,6 +697,7 @@ namespace TEngine if (cancelOrFailed) { + _assetLoadingList.Remove(assetObjectKey); return null; } @@ -752,6 +754,8 @@ namespace TEngine if (!string.IsNullOrEmpty(assetInfo.Error)) { + _assetLoadingList.Remove(assetObjectKey); + string errorMessage = Utility.Text.Format("Can not load asset '{0}' because :'{1}'.", location, assetInfo.Error); if (loadAssetCallbacks.LoadAssetFailureCallback != null) { @@ -840,6 +844,8 @@ namespace TEngine if (!string.IsNullOrEmpty(assetInfo.Error)) { + _assetLoadingList.Remove(assetObjectKey); + string errorMessage = Utility.Text.Format("Can not load asset '{0}' because :'{1}'.", location, assetInfo.Error); if (loadAssetCallbacks.LoadAssetFailureCallback != null) {