Skip to content

Commit

Permalink
Merge pull request #25 from mewlist/unity2022
Browse files Browse the repository at this point in the history
Fix: Compile error on Unity2022
  • Loading branch information
mewlist authored Feb 17, 2024
2 parents cf23ce6 + 7ea219f commit 1355598
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Runtime/Assets/Scene/UnifiedSceneLoader.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Mew.Core.TaskHelpers;
using UnityEngine;
using UnityEngine.SceneManagement;

Expand Down Expand Up @@ -55,7 +56,9 @@ public static async Task<ISceneHandle> LoadAsync(UnifiedScene unifiedScene, Canc
// for test use
else if (!string.IsNullOrEmpty(unifiedScene.EditorScenePath))
{
await EditorSceneManager.LoadSceneAsyncInPlayMode(unifiedScene.EditorScenePath , parameters ) ;
var asyncOp = EditorSceneManager.LoadSceneAsyncInPlayMode(unifiedScene.EditorScenePath , parameters ) ;
while (!asyncOp.isDone)
await TaskHelper.NextFrame();
var loadedScene = SceneManager.GetSceneAt(SceneManager.loadedSceneCount - 1);
handle = new SceneHandle(loadedScene);
}
Expand Down

0 comments on commit 1355598

Please sign in to comment.