Skip to content

Commit

Permalink
处理警告
Browse files Browse the repository at this point in the history
  • Loading branch information
akof1314 committed Oct 13, 2022
1 parent 8cb31d5 commit 5d08c4b
Showing 1 changed file with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private void AnalyzeBundleScenePrepare()
Scene scene = SceneManager.GetSceneAt(i);
if (scene != defaultScene)
{
SceneManager.UnloadScene(scene);
SceneManager.UnloadSceneAsync(scene);
}
}
SceneManager.SetActiveScene(defaultScene);
Expand All @@ -97,19 +97,19 @@ private void AnalyzeBundleScenePrepare()
LoadNextBundleScene();
}

private void PlaymodeStateChanged()
{
if (EditorApplication.isPaused)
{
return;
}
if (!(EditorApplication.isPlaying && EditorApplication.isPlayingOrWillChangePlaymode))
{
return;
}
EditorApplication.playmodeStateChanged -= PlaymodeStateChanged;
AnalyzeBundleScenePrepare();
}
// private void PlaymodeStateChanged()
// {
// if (EditorApplication.isPaused)
// {
// return;
// }
// if (!(EditorApplication.isPlaying && EditorApplication.isPlayingOrWillChangePlaymode))
// {
// return;
// }
// EditorApplication.playmodeStateChanged -= PlaymodeStateChanged;
// AnalyzeBundleScenePrepare();
// }

private void SceneManagerOnSceneLoaded(Scene scene, LoadSceneMode loadSceneMode)
{
Expand Down Expand Up @@ -154,7 +154,7 @@ private IEnumerator AnalyzeBundleScene(Scene scene)

info.ab.Unload(true);
info.ab = null;
SceneManager.UnloadScene(scene);
yield return SceneManager.UnloadSceneAsync(scene);
}

private void LoadNextBundleScene()
Expand Down

0 comments on commit 5d08c4b

Please sign in to comment.