mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-26 18:50:10 +00:00
update runtime code
1. 新增WebGL专属模式WebPlayMode
This commit is contained in:
@@ -123,7 +123,7 @@ namespace YooAsset
|
||||
/// <summary>
|
||||
/// 销毁资源对象
|
||||
/// </summary>
|
||||
public virtual void Destroy()
|
||||
public void Destroy()
|
||||
{
|
||||
IsDestroyed = true;
|
||||
|
||||
@@ -140,6 +140,22 @@ namespace YooAsset
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 销毁资源对象(安全模式)
|
||||
/// </summary>
|
||||
public void DestroySafely()
|
||||
{
|
||||
if (Status == EStatus.Loading || Status == EStatus.Checking)
|
||||
{
|
||||
WaitForAsyncComplete();
|
||||
Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否可以销毁
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user