public static EditorMessageBox Show(string title, string content, string button1Text, Action onButton1Callback = null, string button2Text = null, Action onButton2Callback = null) { EditorMessageBox editorMessageBox = EditorWindow.CreateWindow <EditorMessageBox>(); editorMessageBox.minSize = new Vector2(EditorMessageBoxConst.Width, EditorMessageBoxConst.Height); editorMessageBox.maxSize = editorMessageBox.minSize; editorMessageBox.messageTitle = title; editorMessageBox.content = content; editorMessageBox.button1Text = button1Text; editorMessageBox.onButton1Callback = onButton1Callback; editorMessageBox.button2Text = button2Text; editorMessageBox.onButton2Callback = onButton2Callback; editorMessageBox.Show(); return(editorMessageBox); }
private static IEnumerator IEFade(EditorMessageBox editorMessageBox, float duration) { yield return(new WaitForSeconds(duration)); editorMessageBox.Close(); }