mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
Update SceneModule.cs
修复无法异步加载 挂起的场景
This commit is contained in:
@@ -71,6 +71,9 @@ namespace TEngine
|
|||||||
|
|
||||||
subScene = YooAssets.LoadSceneAsync(location, sceneMode, LocalPhysicsMode.None, suspendLoad, priority);
|
subScene = YooAssets.LoadSceneAsync(location, sceneMode, LocalPhysicsMode.None, suspendLoad, priority);
|
||||||
|
|
||||||
|
//Fix 这里前置,subScene.IsDone在UnSupendLoad之后才会是true
|
||||||
|
_subScenes.Add(location, subScene);
|
||||||
|
|
||||||
if (progressCallBack != null)
|
if (progressCallBack != null)
|
||||||
{
|
{
|
||||||
while (!subScene.IsDone && subScene.IsValid)
|
while (!subScene.IsDone && subScene.IsValid)
|
||||||
@@ -84,8 +87,6 @@ namespace TEngine
|
|||||||
await subScene.ToUniTask();
|
await subScene.ToUniTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
_subScenes.Add(location, subScene);
|
|
||||||
|
|
||||||
_handlingScene.Remove(location);
|
_handlingScene.Remove(location);
|
||||||
|
|
||||||
return subScene.SceneObject;
|
return subScene.SceneObject;
|
||||||
|
Reference in New Issue
Block a user