AsyncOperation
public AsyncOperation _asyncOperation;
IEnumerator AsyncLoad()
{
_asyncOperation = SceneManager.LoadSceneAsync(SceneName);
_asyncOperation.allowSceneActivation = false;
//yield return asyncLoading;
//Debug.Log("Loading Done!!");
while (!_asyncOperation.isDone)
{
_progressbar.fillAmount = _asyncOperation.progress / 0.9f;
yield return null;
}
Debug.Log("Loading done!"+ SceneName);
yield break;
}
댓글
댓글 쓰기