Editor Input Dialog

I’m looking at using an input box dialog so that when the user selects a custom tool bar (MenutItem) option they are presented with a dialog asking them to enter a value. Something akin to the classic VB style InputBox ( http://www.knowdotnet.com/articles/InputBox.jpg ). Preferably this would work exactly the same as the EditorUtility.DisplayDialog() function. The nearest I’ve got is using a derived EditorWindow and creating my own popup this way, but this is not entirely suitable because focus is not locked to the popup as it would be with DisplayDialog() or a conventional dialog in say Windows/Mac.

Any ideas on how to use either a different part of Unity to achieve this input box or on how to lock focus while the popup is displayed?

I agree that an input dialog would be very handy.

In the mean time, you may be interested in some of the solutions for doing modal dialogues here:

It would be nice if you posted your code for the custom editor window as a new answer, just so there’s a complete solution available for others when they come across this.

There is now an example of doing something like this in the docs.