public static bool GetDialogOptOutDecision(DialogOptOutDecisionType dialogOptOutDecisionType, string dialogOptOutDecisionStorageKey) { #if UNITY_2019_4_OR_NEWER return(EditorUtility.GetDialogOptOutDecision((UnityEditor.DialogOptOutDecisionType)dialogOptOutDecisionType, dialogOptOutDecisionStorageKey)); #else switch (dialogOptOutDecisionType) { case DialogOptOutDecisionType.ForThisMachine: return(EditorPrefs.GetBool(dialogOptOutDecisionStorageKey, false)); case DialogOptOutDecisionType.ForThisSession: return(SessionState.GetBool(dialogOptOutDecisionStorageKey, false)); default: throw new NotImplementedException(string.Format("The DialogOptOut type named {0} has not been implemented.", dialogOptOutDecisionType)); } #endif }