public static bool?SetBoolAndReturnPrevious(string key, bool value) { bool?result = null; if (UserPrefs.HasKey(key)) { result = new bool?(PlayerPrefs.GetInt(key) >= 1); } UserPrefs.SetBool(key, value); return(result); }
public static bool?SetBoolAndReturnPrevious(string key, bool value) { bool?result = null; if (UserPrefs.HasKey(key)) { result = new bool?(PlayerPrefs.GetInt(key) >= 1); } UserPrefs.SetBool(key, value); return(result); }