IEnumerator RestartLevel() { yield return(new WaitForSeconds(m_waitTimeAfterDie)); // launch fade to black if (m_gui) { m_gui.LoadLevel(SceneManager.GetActiveScene().name); } // remove player gameObject.SetActive(false); }
IEnumerator RestartLevel() { yield return(new WaitForSeconds(m_waitTimeAfterDie)); // launch fade to black if (m_gui) { m_gui.LoadLevel(Application.loadedLevelName); } // remove player gameObject.SetActive(false); }