# GetDialogOptOutDecision(DialogOptOutDecisionType, string)

> This method displays a modal dialog that lets the user opt-out of being shown the current dialog box again.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
public static bool GetDialogOptOutDecision(DialogOptOutDecisionType dialogOptOutDecisionType, string dialogOptOutDecisionStorageKey)
```

### Parameters

**** (\[DialogOptOutDecisionType]\(/engine/6000.0/script-reference/unityeditor/dialogoptoutdecisiontype)): The type of opt-out decision a user can make.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The unique key setting to store the decision under.

### Returns

| Type                                                          | Description                                                                                                                                               |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | true if the user previously opted out of seeing the dialog associated with dialogOptOutDecisionStorageKey. Returns false if the user did not yet opt out. |

### Remarks

Use this method as a short-hand to query the opt-out decision a user made on a dialog displayed via [EditorUtility.DisplayDialog](/engine/6000.0/script-reference/unityeditor/editorutility/displaydialog.md).

You don't need to query this before you call [EditorUtility.DisplayDialog](/engine/6000.0/script-reference/unityeditor/editorutility/displaydialog.md), as Unity handles it automatically.

If the user chooses to opt-out of a dialog box, Unity stores this decision. If dialogOptOutDecisionType is set to [DialogOptOutDecisionType.ForThisMachine](/engine/6000.0/script-reference/unityeditor/dialogoptoutdecisiontype/forthismachine.md) Unity stores it via [EditorPrefs.SetBool](/engine/6000.0/script-reference/unityeditor/editorprefs/setbool.md). If dialogOptOutDecisionType is set to [DialogOptOutDecisionType.ForThisSession](/engine/6000.0/script-reference/unityeditor/dialogoptoutdecisiontype/forthissession.md) Unity stores it via [SessionState.SetBool](/engine/6000.0/script-reference/unityeditor/sessionstate/setbool.md). In both cases Unity stores it under the key provided as dialogOptOutDecisionStorageKey.

This method automatically selects the storage place based on the provided dialogOptOutDecisionType.

If you want to the let the user change their decision that is stored in [EditorPrefs](/engine/6000.0/script-reference/unityeditor/editorprefs.md), you can add this to the Editor Preferences with a [SettingsProvider](/engine/6000.0/script-reference/unityeditor/settingsprovider.md).

Additional Resources: [EditorUtility.DisplayDialog](/engine/6000.0/script-reference/unityeditor/editorutility/displaydialog.md) function.
