UI update 02

This commit is contained in:
2026-06-30 21:21:30 +08:00
parent b2a1e307a4
commit f62f643cfc
1666 changed files with 211081 additions and 22799 deletions
@@ -1578,8 +1578,17 @@ public class GameManager : MonoBehaviour
private IEnumerator LoadSceneAsync(string sceneName)
{
if (gTransition.LoadScene(sceneName, LoadSceneMode.Single))
{
while (gTransition.IsBusy)
{
yield return null;
}
yield break;
}
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(sceneName);
while (!asyncLoad.isDone)
while (asyncLoad != null && !asyncLoad.isDone)
{
yield return null;
}
@@ -1588,10 +1597,19 @@ public class GameManager : MonoBehaviour
private IEnumerator FadeToBlackAndLoad(string sceneName, float duration)
{
RecordTotalPlayTime();
if (gTransition.LoadScene(sceneName, LoadSceneMode.Single, duration, duration))
{
while (gTransition.IsBusy)
{
yield return null;
}
yield break;
}
if (blackMaskImage == null)
{
AsyncOperation asyncOp = SceneManager.LoadSceneAsync(sceneName);
while (!asyncOp.isDone) yield return null;
while (asyncOp != null && !asyncOp.isDone) yield return null;
yield break;
}
@@ -1620,7 +1638,7 @@ public class GameManager : MonoBehaviour
// load scene
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(sceneName);
while (!asyncLoad.isDone)
while (asyncLoad != null && !asyncLoad.isDone)
{
yield return null;
}