|
|
|
|
|
|
|
|
|
|
[Header("UI Configuration")] |
|
|
|
public GameObject LoadingRoot; |
|
|
|
public GameObject LoadingIcon; |
|
|
|
public GameObject ProgressBar; |
|
|
|
public GameObject ProgressBarContainer; |
|
|
|
public Text LoadingText; |
|
|
|
|
|
|
if (showUI) |
|
|
|
LoadingRoot.SetActive(true); |
|
|
|
|
|
|
|
if (LoadingIcon != null) |
|
|
|
LoadingIcon.SetActive(true); |
|
|
|
|
|
|
|
if (count > 0) |
|
|
|
StartCoroutine(LoadScenesCoroutine(action, requiredScenes, sceneToActivate, showUI, onLoadComplete)); |
|
|
|
else |
|
|
|
|
|
|
|
|
|
|
if (showUI) |
|
|
|
LoadingRoot.SetActive(false); |
|
|
|
|
|
|
|
if (LoadingIcon != null) |
|
|
|
LoadingIcon.SetActive(false); |
|
|
|
|
|
|
|
if (EnableDebug) |
|
|
|
DebugText.gameObject.SetActive(false); |
|
|
|
|
|
|
|
|
|
|
if (showUI) |
|
|
|
LoadingRoot.SetActive(false); |
|
|
|
|
|
|
|
if (LoadingIcon != null) |
|
|
|
LoadingIcon.SetActive(false); |
|
|
|
|
|
|
|
if (EnableDebug) |
|
|
|
DebugText.gameObject.SetActive(false); |
|
|
|