# SetDialogOptOutDecision(DialogOptOutDecisionType, string, bool)

> 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 void SetDialogOptOutDecision(DialogOptOutDecisionType dialogOptOutDecisionType, string dialogOptOutDecisionStorageKey, bool optOutDecision)
```

### 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.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to opt out or not.

### Remarks

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

You don't need to set this after 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 sets the decision in the storage place based on the provided dialogOptOutDecisionType.

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