# EditorDialogEvents

> Raises events when a modal dialog opens or closes anywhere in the Editor.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static class EditorDialogEvents
```

## Remarks

Use these events to detect that a dialog is blocking the Editor's main thread rather than that the Editor has stopped responding.

Coverage is mechanism-based, not exhaustive — only dialogs shown through the two paths below are visible here. Confirmed covered: the [EditorUtility.DisplayDialog](/engine/6000.7/script-reference/unityeditor/editorutility/displaydialog.md) family and other native alerts (via `DialogScope`), and any [EditorWindow](/engine/6000.7/script-reference/unityeditor/editorwindow.md) shown with [EditorWindow.ShowModal()](/engine/6000.7/script-reference/unityeditor/editorwindow/showmodal.md) or [EditorWindow.ShowModalUtility()](/engine/6000.7/script-reference/unityeditor/editorwindow/showmodalutility.md) (both route through `MakeModal`, on every platform). Confirmed NOT covered: OS-native file and folder pickers ([EditorUtility.OpenFilePanel](/engine/6000.7/script-reference/unityeditor/editorutility/openfilepanel.md), [EditorUtility.SaveFilePanel](/engine/6000.7/script-reference/unityeditor/editorutility/savefilepanel.md), and their siblings) — they bind directly to the platform's own picker APIs, with no `DialogScope` or `MakeModal` involved. Any other dialog implemented through a different mechanism (a custom native window, or Editor UI that isn't an [EditorWindow](/engine/6000.7/script-reference/unityeditor/editorwindow.md)) is also not covered. Treat the absence of a [dialogWillShow](/engine/6000.7/script-reference/unityeditor/editordialogevents/dialogwillshow.md)/[dialogDismissed](/engine/6000.7/script-reference/unityeditor/editordialogevents/dialogdismissed.md) pair as "no dialog of a covered kind is open," not as proof the Editor isn't blocked by some other popup — callers still need a fallback signal (for example, a command timeout) for the uncovered cases.

## Static Events

| Member                                                                                               | Description                                                                                                                                                  |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [dialogDismissed](/engine/6000.7/script-reference/unityeditor/editordialogevents/dialogdismissed.md) | Raised when a dialog that previously raised [dialogWillShow](/engine/6000.7/script-reference/unityeditor/editordialogevents/dialogwillshow.md) is dismissed. |
| [dialogWillShow](/engine/6000.7/script-reference/unityeditor/editordialogevents/dialogwillshow.md)   | Raised before a dialog is shown to the user.                                                                                                                 |
