update runtime code

1. 新增WebGL专属模式WebPlayMode
This commit is contained in:
hevinci
2023-07-18 14:27:33 +08:00
parent 9dd7680457
commit 0c1efe7420
40 changed files with 1616 additions and 554 deletions
@@ -144,6 +144,15 @@ namespace YooAsset
}
}
/// <summary>
/// 销毁资源包(安全模式)
/// </summary>
public void DestroySafely()
{
WaitForAsyncComplete();
Destroy();
}
/// <summary>
/// 轮询更新
@@ -153,18 +162,15 @@ namespace YooAsset
/// <summary>
/// 销毁
/// </summary>
public virtual void Destroy(bool forceDestroy)
public virtual void Destroy()
{
IsDestroyed = true;
// Check fatal
if (forceDestroy == false)
{
if (RefCount > 0)
throw new Exception($"Bundle file loader ref is not zero : {MainBundleInfo.Bundle.BundleName}");
if (IsDone() == false)
throw new Exception($"Bundle file loader is not done : {MainBundleInfo.Bundle.BundleName}");
}
if (RefCount > 0)
throw new Exception($"Bundle file loader ref is not zero : {MainBundleInfo.Bundle.BundleName}");
if (IsDone() == false)
throw new Exception($"Bundle file loader is not done : {MainBundleInfo.Bundle.BundleName}");
if (CacheBundle != null)
{