赞
踩
- if (nextScene != "")
- {
- SceneManager.LoadSceneAsync(nextScene);
- yield return StartCoroutine(waitForLevelToLoad(nextScene));
- }
- private IEnumerator waitForLevelToLoad(string level)
- {
- while (SceneManager.GetActiveScene().name != level)
- {
- Debug.Log("loading scene:" + SceneManager.GetActiveScene().name);
- yield return null;
- }
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。