mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Update SceneModule.cs
This commit is contained in:
@@ -153,14 +153,11 @@ namespace TEngine
|
|||||||
|
|
||||||
subScene = YooAssets.LoadSceneAsync(location, sceneMode, LocalPhysicsMode.None, suspendLoad, priority);
|
subScene = YooAssets.LoadSceneAsync(location, sceneMode, LocalPhysicsMode.None, suspendLoad, priority);
|
||||||
|
|
||||||
if (callBack != null)
|
subScene.Completed += handle =>
|
||||||
{
|
{
|
||||||
subScene.Completed += handle =>
|
_handlingScene.Remove(location);
|
||||||
{
|
callBack?.Invoke(handle.SceneObject);
|
||||||
_handlingScene.Remove(location);
|
};
|
||||||
callBack.Invoke(handle.SceneObject);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (progressCallBack != null)
|
if (progressCallBack != null)
|
||||||
{
|
{
|
||||||
@@ -181,14 +178,11 @@ namespace TEngine
|
|||||||
|
|
||||||
_currentMainScene = YooAssets.LoadSceneAsync(location, sceneMode, LocalPhysicsMode.None, suspendLoad, priority);
|
_currentMainScene = YooAssets.LoadSceneAsync(location, sceneMode, LocalPhysicsMode.None, suspendLoad, priority);
|
||||||
|
|
||||||
if (callBack != null)
|
_currentMainScene.Completed += handle =>
|
||||||
{
|
{
|
||||||
_currentMainScene.Completed += handle =>
|
_handlingScene.Remove(location);
|
||||||
{
|
callBack?.Invoke(handle.SceneObject);
|
||||||
_handlingScene.Remove(location);
|
};
|
||||||
callBack.Invoke(handle.SceneObject);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (progressCallBack != null)
|
if (progressCallBack != null)
|
||||||
{
|
{
|
||||||
@@ -376,15 +370,12 @@ namespace TEngine
|
|||||||
}
|
}
|
||||||
|
|
||||||
subScene.UnloadAsync();
|
subScene.UnloadAsync();
|
||||||
if (callBack != null)
|
subScene.UnloadAsync().Completed += @base =>
|
||||||
{
|
{
|
||||||
subScene.UnloadAsync().Completed += @base =>
|
_subScenes.Remove(location);
|
||||||
{
|
_handlingScene.Remove(location);
|
||||||
_subScenes.Remove(location);
|
callBack?.Invoke();
|
||||||
_handlingScene.Remove(location);
|
};
|
||||||
callBack.Invoke();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (progressCallBack != null)
|
if (progressCallBack != null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user