#94 资源加载assetLoadingList处理

#94 资源加载assetLoadingList处理
This commit is contained in:
ALEXTANG
2024-08-24 21:02:12 +08:00
parent 4911ec074c
commit f785264873

View File

@@ -659,6 +659,7 @@ namespace TEngine
if (cancelOrFailed) if (cancelOrFailed)
{ {
_assetLoadingList.Remove(assetObjectKey);
return null; return null;
} }
@@ -696,6 +697,7 @@ namespace TEngine
if (cancelOrFailed) if (cancelOrFailed)
{ {
_assetLoadingList.Remove(assetObjectKey);
return null; return null;
} }
@@ -752,6 +754,8 @@ namespace TEngine
if (!string.IsNullOrEmpty(assetInfo.Error)) if (!string.IsNullOrEmpty(assetInfo.Error))
{ {
_assetLoadingList.Remove(assetObjectKey);
string errorMessage = Utility.Text.Format("Can not load asset '{0}' because :'{1}'.", location, assetInfo.Error); string errorMessage = Utility.Text.Format("Can not load asset '{0}' because :'{1}'.", location, assetInfo.Error);
if (loadAssetCallbacks.LoadAssetFailureCallback != null) if (loadAssetCallbacks.LoadAssetFailureCallback != null)
{ {
@@ -840,6 +844,8 @@ namespace TEngine
if (!string.IsNullOrEmpty(assetInfo.Error)) if (!string.IsNullOrEmpty(assetInfo.Error))
{ {
_assetLoadingList.Remove(assetObjectKey);
string errorMessage = Utility.Text.Format("Can not load asset '{0}' because :'{1}'.", location, assetInfo.Error); string errorMessage = Utility.Text.Format("Can not load asset '{0}' because :'{1}'.", location, assetInfo.Error);
if (loadAssetCallbacks.LoadAssetFailureCallback != null) if (loadAssetCallbacks.LoadAssetFailureCallback != null)
{ {