public async Task <bool> ContainsKey(string key) { var res = PlayerPrefsV2.HasKey(key); if (!res && fallbackStore != null) { return(await fallbackStore.ContainsKey(key)); } return(res); }
private T InternalGet <T>(string key, T defaultValue) { if (!PlayerPrefsV2.HasKey(key)) { return(defaultValue); } var value = PlayerPrefsV2.GetString(key); var wrapper = jsonReader.Read <ValueWrapper>(value); if (wrapper == null) { Log.e($"Entry not a ValueWrapper but instead: '{value}'"); return(defaultValue); } return(wrapper.GetValueAs <T>()); }