In an editor script, how do you add an 'Are you sure?' pop up window?

I’m wondering how tough it’d be to add an ‘are you sure?’ pop up window right after something like this happens in an editor script:

    public static EditorWindow AreYouSureWindow;

    [UnityEditor.MenuItem("Data/Generate all .map files from scene files")]
    private static void BakeAllMapFiles() { 

        AreYouSureWindow = EditorWindow.CreateInstance<EditorWindow>();
        AreYouSureWindow.position = new Rect (0, 0, 150, 75);
        AreYouSureWindow.Show();
    }

Is it possible to do everything right from this one editor script, and how would I go about adding content into this instance of this window?

            bool answerWasYes = EditorUtility.DisplayDialog ("Title", "Are you sure?", "Yes", "No");
1 Like

@StarManta

Thank you very much, I’ll give it a shot.