public void LoadScene(string name, LoadCompletedDelegate finishDelegate) { Application.LoadLevel(name); if (finishDelegate != null) { finishDelegate(); } }
private IEnumerator load() { SceneManager.LoadScene(sceneName); yield return(null); if (finishDel != null) { finishDel(); finishDel = null; } }
public void LoadScene(string name, SceneLoader.LoadCompletedDelegate finishDelegate = null) { this.sceneName = name; this.finishDel = finishDelegate; StartCoroutine(load()); }