public IEnumerator SequenceCoroutine(string sequence) { string[] moves = sequence.Split(' '); Manager.ToggleButtons(); foreach (string move in moves) { DoMove(move); //StartCoroutine(Wait()); yield return(new WaitForSeconds(sequenceDelay)); } Debug.Log("solve now"); // enable buttons here Manager.ToggleButtons(); solver.PrintCurrentCube(); }