mirror of https://github.com/tuyoogame/YooAsset
feat : add load scene sync method
parent
f4ddaedbf4
commit
2a5a2626a4
|
@ -35,6 +35,12 @@ namespace YooAsset
|
|||
// 1. 检测资源包
|
||||
if (_steps == ESteps.CheckBundle)
|
||||
{
|
||||
if (IsWaitForAsyncComplete)
|
||||
{
|
||||
DependBundles.WaitForAsyncComplete();
|
||||
OwnerBundle.WaitForAsyncComplete();
|
||||
}
|
||||
|
||||
if (DependBundles.IsDone() == false)
|
||||
return;
|
||||
if (OwnerBundle.IsDone() == false)
|
||||
|
@ -62,6 +68,7 @@ namespace YooAsset
|
|||
{
|
||||
if (IsWaitForAsyncComplete || IsForceDestroyComplete)
|
||||
{
|
||||
// 注意:场景同步加载方法不会立即加载场景,而是在下一帧加载。
|
||||
LoadSceneParameters parameters = new LoadSceneParameters(SceneMode);
|
||||
SceneObject = SceneManager.LoadScene(MainAssetInfo.AssetPath, parameters);
|
||||
_steps = ESteps.Checking;
|
||||
|
|
Loading…
Reference in New Issue