update asset system

mlyDevMerge1.5.7
hevinci 2023-07-28 17:17:23 +08:00 committed by QiJing
parent 0a516b78c2
commit fcc451aa90
3 changed files with 6 additions and 29 deletions

View File

@ -128,11 +128,13 @@ namespace YooAsset
#else #else
foreach (var provider in _providerList) foreach (var provider in _providerList)
{ {
provider.DestroySafely(); provider.WaitForAsyncComplete();
provider.Destroy();
} }
foreach (var loader in _loaderList) foreach (var loader in _loaderList)
{ {
loader.DestroySafely(); loader.WaitForAsyncComplete();
loader.Destroy();
} }
_providerList.Clear(); _providerList.Clear();
@ -416,7 +418,7 @@ namespace YooAsset
return null; return null;
} }
#region 调试信息 #region 调试信息
internal List<DebugProviderInfo> GetDebugReportInfos() internal List<DebugProviderInfo> GetDebugReportInfos()
{ {
List<DebugProviderInfo> result = new List<DebugProviderInfo>(_providerList.Count); List<DebugProviderInfo> result = new List<DebugProviderInfo>(_providerList.Count);
@ -444,6 +446,6 @@ namespace YooAsset
} }
return result; return result;
} }
#endregion #endregion
} }
} }

View File

@ -144,15 +144,6 @@ namespace YooAsset
} }
} }
/// <summary>
/// 销毁资源包(安全模式)
/// </summary>
public void DestroySafely()
{
WaitForAsyncComplete();
Destroy();
}
/// <summary> /// <summary>
/// 轮询更新 /// 轮询更新

View File

@ -140,22 +140,6 @@ namespace YooAsset
} }
} }
/// <summary>
/// 销毁资源对象(安全模式)
/// </summary>
public void DestroySafely()
{
if (Status == EStatus.Loading || Status == EStatus.Checking)
{
WaitForAsyncComplete();
Destroy();
}
else
{
Destroy();
}
}
/// <summary> /// <summary>
/// 是否可以销毁 /// 是否可以销毁
/// </summary> /// </summary>