if (GUILayout.Button("清空")) { if (EditorUtility.DisplayDialog("警告","确定要...?","Ok","Cancel")) { // Do Something } else { // Do Something } }