private IEnumerator StartWaitWindowIEnumerator(string m, MessageManagerDelegate CallBack = null) { waitWindow.SetMessage(m); waitWindow.gameObject.SetActive(true); wait = true; while (wait) { yield return(new WaitForEndOfFrame()); } waitWindow.gameObject.SetActive(false); if (CallBack != null) { CallBack(); } }