修复了挂起场景未解除状态前无法卸载的问题。
pull/274/head
hevinci 2024-04-03 17:14:16 +08:00
parent b5ffd5005a
commit 1461b91a94
1 changed files with 16 additions and 0 deletions

View File

@ -31,6 +31,22 @@ namespace YooAsset
{ {
_error = null; _error = null;
_provider = provider; _provider = provider;
// 注意:卸载场景前必须先解除挂起操作
if (provider is DatabaseSceneProvider)
{
var temp = provider as DatabaseSceneProvider;
temp.UnSuspendLoad();
}
else if (provider is BundledSceneProvider)
{
var temp = provider as BundledSceneProvider;
temp.UnSuspendLoad();
}
else
{
throw new System.NotImplementedException();
}
} }
internal override void InternalOnStart() internal override void InternalOnStart()
{ {