mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-23 01:00:16 +00:00
update runtime code
1. 新增WebGL专属模式WebPlayMode
This commit is contained in:
@@ -111,7 +111,7 @@ namespace YooAsset
|
||||
if (loader.CanDestroy())
|
||||
{
|
||||
string bundleName = loader.MainBundleInfo.Bundle.BundleName;
|
||||
loader.Destroy(false);
|
||||
loader.Destroy();
|
||||
_loaderList.RemoveAt(i);
|
||||
_loaderDic.Remove(bundleName);
|
||||
}
|
||||
@@ -123,15 +123,16 @@ namespace YooAsset
|
||||
/// </summary>
|
||||
public void ForceUnloadAllAssets()
|
||||
{
|
||||
#if UNITY_WEBGL
|
||||
throw new Exception($"WebGL not support invoke {nameof(ForceUnloadAllAssets)}");
|
||||
#else
|
||||
foreach (var provider in _providerList)
|
||||
{
|
||||
provider.WaitForAsyncComplete();
|
||||
provider.Destroy();
|
||||
provider.DestroySafely();
|
||||
}
|
||||
foreach (var loader in _loaderList)
|
||||
{
|
||||
loader.WaitForAsyncComplete();
|
||||
loader.Destroy(true);
|
||||
loader.DestroySafely();
|
||||
}
|
||||
|
||||
_providerList.Clear();
|
||||
@@ -142,6 +143,7 @@ namespace YooAsset
|
||||
|
||||
// 注意:调用底层接口释放所有资源
|
||||
Resources.UnloadUnusedAssets();
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -414,7 +416,7 @@ namespace YooAsset
|
||||
return null;
|
||||
}
|
||||
|
||||
#region 调试信息
|
||||
#region 调试信息
|
||||
internal List<DebugProviderInfo> GetDebugReportInfos()
|
||||
{
|
||||
List<DebugProviderInfo> result = new List<DebugProviderInfo>(_providerList.Count);
|
||||
@@ -442,6 +444,6 @@ namespace YooAsset
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user