Disable the scene while displaying editor progress bar.

hi, I am displaying a progress bar using “EditorUtility.DisplayProgressBar”, but I still can modify the scene while progress bar is showing. I don’t want scene to be modified while editor script is processing the scene. Is it possible to display the progress bar and disable scene editing.

Can you give more detail about the work you want to process by the script? Since if you do the processing in one single call. The editor will be blocked automatically. Like,

public class testEditor
{
    [MenuItem("Test/TestProgressBar")]
    static void TestProgressBar()
    {
        double startTime = EditorApplication.timeSinceStartup;

        while(EditorApplication.timeSinceStartup < startTime + 5)
            EditorUtility.DisplayProgressBar("", "", (float)((EditorApplication.timeSinceStartup - startTime) / 5));

        EditorUtility.ClearProgressBar();

    }
}