Awaiting a custom EditorWindow on the main thread (e.g for a string input)?

Hello,
I’m currently working on a tool to manage my build version numbers. What I would like is a tool that displays a custom EditorWindow, but in the way EditorUtility.DisplayDialog() does, meaning that the Editor is “frozen” until an input is registered.

I had a first version of this, which used mutiple EditorUtility.DisplayDialogComplex() calls one after the other. The script implemented IPreProcessBuildWithReport, so this was called just before the player building process started.

I’d like to rework this tool to keep it in the player’s preprocessing, but with more options, and especially the equivalent of a TextField.

And more generally speaking, I’d like to be able to make the Editor await for certain user validations. How can I do that please?

Thank you!