protected IEnumerator UpdateLoadingBar(UiPnlLoading loading) { int safeGuard = 0; loading.SetSliderValue(0f); while (loading.loadingProgress.CurrentAsyncLoadingProgress < 1f) { loading.SetSliderValue(loading.loadingProgress.CurrentAsyncLoadingProgress); safeGuard++; if (safeGuard >= 25 * 1000 / 33) { break; } yield return(null); } loading.SetSliderValue(1f); yield return(null); }
protected void StartLoadingBarUpdateCoroutine(UiPnlLoading loading) { StopCoroutine("UpdateLoadingBar"); StartCoroutine(UpdateLoadingBar(loading)); }