From 0fde089f7664479b3caddf8ec526c57e4d496182 Mon Sep 17 00:00:00 2001 From: Jeff Campbell <1663648+jeffcampbellmakesgames@users.noreply.github.com> Date: Thu, 7 Nov 2019 10:50:19 +0100 Subject: [PATCH] Update SOArchitecturePreferences.cs Fix for bool pref always set/returned as true --- Assets/SO Architecture/SOArchitecturePreferences.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/SO Architecture/SOArchitecturePreferences.cs b/Assets/SO Architecture/SOArchitecturePreferences.cs index 6a8cfbfb..0a277b54 100644 --- a/Assets/SO Architecture/SOArchitecturePreferences.cs +++ b/Assets/SO Architecture/SOArchitecturePreferences.cs @@ -174,7 +174,7 @@ private static void DrawPersonalPrefsGUI(string value = "") /// private static bool GetBoolPref(string key, bool defaultValue) { - if (EditorPrefs.HasKey(key)) + if (!EditorPrefs.HasKey(key)) { EditorPrefs.SetBool(key, defaultValue); } @@ -184,4 +184,4 @@ private static bool GetBoolPref(string key, bool defaultValue) } } -#endif \ No newline at end of file +#endif