private IEnumerator WaitForAnimation(string scene, GameObject button) { //animIsPlaying = button.GetComponent<Animation>().isPlaying; //yield return new WaitUntil(() => (animIsPlaying = false)); yield return(new WaitForSeconds(0.3f)); COM_Director.LoadSceneByName(scene); }
///<summary> /// Sends a request to the director to change the scene. ///</summary> ///<param name="scene"> A string representing the name of the scene you are requesting to change to.</param> public void RequestSceneChange(string scene) { COM_Director.LoadSceneByName(scene); }