UI update 02
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user