IEnumerator openMsgBox(string _header, MsgBoxCallback _callback = null, MSGBOX_BTN_TYPE _type = MSGBOX_BTN_TYPE.OK) { while (msgBox.gameObject.activeInHierarchy) { yield return(null); } msgBox.gameObject.SetActive(true); msgBox.Init(_header, _callback, _type); }
private void write_to_msg_box(string msg) { if (this.msg_box.InvokeRequired) { MsgBoxCallback d = new MsgBoxCallback(write_to_msg_box); this.Invoke(d, new object[] { msg }); } else { msg_box.AppendText(msg+"\n"); //Thread.Sleep(500); } }
public void OpenMsgBox(string _header, MsgBoxCallback _callback = null, MSGBOX_BTN_TYPE _type = MSGBOX_BTN_TYPE.OK) { StartCoroutine(openMsgBox(_header, _callback, _type)); }