UI update 02
This commit is contained in:
@@ -9,6 +9,7 @@ using UnityEngine.UI;
|
||||
using TMPro;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using Bansonic;
|
||||
|
||||
public class pressStart : MonoBehaviour
|
||||
{
|
||||
@@ -301,7 +302,10 @@ public class pressStart : MonoBehaviour
|
||||
// 3. 切换场景
|
||||
Debug.Log("[pressStart] Transition sequence complete. Loading UI_UI scene.");
|
||||
Time.timeScale = 1f;
|
||||
SceneManager.LoadScene("UI_UI");
|
||||
if (!gTransition.LoadScene("UI_UI", LoadSceneMode.Single))
|
||||
{
|
||||
SceneManager.LoadScene("UI_UI");
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator PollForBanflagAndProceed()
|
||||
@@ -316,8 +320,17 @@ public class pressStart : MonoBehaviour
|
||||
UpdateStatus(LocalizationService.Get("press_start.loading_test_mode", "Banflag detected. Loading test mode..."), Color.green);
|
||||
// small delay to show status
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
if (gTransition.LoadScene(testModeSceneName, LoadSceneMode.Single))
|
||||
{
|
||||
while (gTransition.IsBusy)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(testModeSceneName);
|
||||
while (!asyncLoad.isDone)
|
||||
while (asyncLoad != null && !asyncLoad.isDone)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
@@ -334,8 +347,17 @@ public class pressStart : 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user