예제 #1
0
        IEnumerator LoadSceneCoroutine(string sceneName, OnFinishLoadingScene onFinishDelegate)
        {
            var operation = SceneManager.LoadSceneAsync(sceneName);

            while (!operation.isDone)
            {
                yield return(null); // wait for next frame
            }

            onFinishDelegate();
        }
예제 #2
0
 void LoadSceneAsync(string sceneName, OnFinishLoadingScene onFinishDelegate)
 {
     StartCoroutine(LoadSceneCoroutine(sceneName, onFinishDelegate));
 }