UI update 02
This commit is contained in:
@@ -8,6 +8,7 @@ using System.Collections;
|
||||
using UnityEngine.Audio;
|
||||
using DG.Tweening;
|
||||
using GameServer.Client;
|
||||
using Bansonic;
|
||||
|
||||
public class settlementController : MonoBehaviour
|
||||
{
|
||||
@@ -1912,8 +1913,17 @@ public class settlementController : 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;
|
||||
}
|
||||
@@ -2006,10 +2016,19 @@ public class settlementController : MonoBehaviour
|
||||
// Coroutine that will be started on the GameManager instance so that the gm's MonoBehaviour runs it
|
||||
private IEnumerator FadeToBlackAndLoadOnGM(string sceneName, float duration)
|
||||
{
|
||||
if (gTransition.LoadScene(sceneName, LoadSceneMode.Single, duration, duration))
|
||||
{
|
||||
while (gTransition.IsBusy)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (gm == null || gm.blackMaskImage == null)
|
||||
{
|
||||
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(sceneName);
|
||||
while (!asyncLoad.isDone) yield return null;
|
||||
while (asyncLoad != null && !asyncLoad.isDone) yield return null;
|
||||
yield break;
|
||||
}
|
||||
|
||||
@@ -2040,7 +2059,7 @@ public class settlementController : MonoBehaviour
|
||||
|
||||
// load target scene
|
||||
AsyncOperation asyncOp = SceneManager.LoadSceneAsync(sceneName);
|
||||
while (!asyncOp.isDone)
|
||||
while (asyncOp != null && !asyncOp.isDone)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user