async.allowSceneActivation = false;
private AsyncOperation async; async = SceneManager.LoadSceneAsync("MainScene"); async.allowSceneActivation = false; yield return StartCoroutine(Loading()); IEnumerator Loading() { float curProgress = 0f; while (curProgress<=1f) { float toProgress = async.progress/0.9f; while (curProgress<toProgress) { curProgress += 0.01f; loadbarClass.SetProgress(curProgress); yield return new WaitForEndOfFrame(); } } } // async.allowSceneActivation = true;
标签:场景,false,allowSceneActivation,Unity,Loading,curProgress,async,加载 From: https://www.cnblogs.com/weigangblog/p/18201387