IEnumerator WaitForAnim(string loadScene) { TransitionScene _animMaster = FindObjectOfType <TransitionScene>(); _animMaster.EndAnim(); yield return(new WaitForSeconds(_animMaster._animTime)); SceneManager.LoadScene(loadScene); }
IEnumerator WaitAnimCreditOn() { TransitionScene _animMaster = FindObjectOfType <TransitionScene>(); _animMaster.EndAnim(); yield return(new WaitForSeconds(_animMaster._animTime)); //UI_Credits.SetActive(true); //UI_MainMenu.SetActive(false); SceneManager.LoadScene("TestCardJulien"); yield return(new WaitForSeconds(_animMaster._animTime)); _animMaster.StartAnim(); }
IEnumerator LoadYourAsyncScene(string scene) { loadingScene = true; TransitionScene _animMaster = FindObjectOfType <TransitionScene>(); _animMaster.EndAnim(); yield return(new WaitForSeconds(_animMaster._animTime)); AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(scene); // Wait until the asynchronous scene fully loads while (!asyncLoad.isDone) { yield return(null); } }