현재 씬과 동일한 씬타입에 있을 경우 로드하지 않음
This commit is contained in:
parent
0c603187c7
commit
ad6c4f6280
@ -37,6 +37,11 @@ public async Task Init()
|
|||||||
foreach (SceneType sceneType in Enum.GetValues(typeof(SceneType)))
|
foreach (SceneType sceneType in Enum.GetValues(typeof(SceneType)))
|
||||||
{
|
{
|
||||||
if (sceneType == SceneType.Entry) continue;
|
if (sceneType == SceneType.Entry) continue;
|
||||||
|
var currentScene = UnityEngine.SceneManagement.SceneManager.GetActiveScene();
|
||||||
|
if (sceneType.ToString() == currentScene.name)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
await PreloadSceneAsync(sceneType);
|
await PreloadSceneAsync(sceneType);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user