Пример #1
0
    IEnumerator LoadMainScene()
    {
        ConfigDataStatic.LoadAllConfigData();
        asyncOp = FacadeSingleton.Instance.LoadSceneAsync("SSanctuary");
        asyncOp.allowSceneActivation = false;
        yield return(asyncOp);

        int timer = -1;

        while (timer < 3)
        {
            timer++;
            progress.value = (float)timer / 3f;
            yield return(new WaitForSeconds(1.0f));
        }
        // while(asyncOp.isDone == false)
        // {
        //     yield return null;
        // }
        ShowEnterBtn();
    }