diff --git a/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs b/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs index a44c3b0..c3825e9 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs @@ -128,11 +128,13 @@ namespace YooAsset #else foreach (var provider in _providerList) { - provider.DestroySafely(); + provider.WaitForAsyncComplete(); + provider.Destroy(); } foreach (var loader in _loaderList) { - loader.DestroySafely(); + loader.WaitForAsyncComplete(); + loader.Destroy(); } _providerList.Clear(); @@ -416,7 +418,7 @@ namespace YooAsset return null; } -#region 调试信息 + #region 调试信息 internal List GetDebugReportInfos() { List result = new List(_providerList.Count); @@ -444,6 +446,6 @@ namespace YooAsset } return result; } -#endregion + #endregion } } \ No newline at end of file diff --git a/Assets/YooAsset/Runtime/AssetSystem/Loader/BundleLoaderBase.cs b/Assets/YooAsset/Runtime/AssetSystem/Loader/BundleLoaderBase.cs index 5c517e0..12d3e4d 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Loader/BundleLoaderBase.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Loader/BundleLoaderBase.cs @@ -144,15 +144,6 @@ namespace YooAsset } } - /// - /// 销毁资源包(安全模式) - /// - public void DestroySafely() - { - WaitForAsyncComplete(); - Destroy(); - } - /// /// 轮询更新 diff --git a/Assets/YooAsset/Runtime/AssetSystem/Provider/ProviderBase.cs b/Assets/YooAsset/Runtime/AssetSystem/Provider/ProviderBase.cs index 86ca7e8..68491dc 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Provider/ProviderBase.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Provider/ProviderBase.cs @@ -140,22 +140,6 @@ namespace YooAsset } } - /// - /// 销毁资源对象(安全模式) - /// - public void DestroySafely() - { - if (Status == EStatus.Loading || Status == EStatus.Checking) - { - WaitForAsyncComplete(); - Destroy(); - } - else - { - Destroy(); - } - } - /// /// 是否可以销毁 ///