コード例 #1
0
    private static void SavePersistentCache()
    {
        lastTimeSavedPersistentCache = DCLTime.realtimeSinceStartup;

        //NOTE(Brian): Use JsonConvert because unity JsonUtility doesn't support dictionaries
        string cacheJson = JsonConvert.SerializeObject(dependenciesMap);

        PlayerPrefsUtils.SetString(PERSISTENT_CACHE_KEY, cacheJson);
    }
    private void SaveLatestReadChatMessagesStatus()
    {
        List <KeyValuePair <string, long> > lastReadChatMessagesList = new List <KeyValuePair <string, long> >();

        using (var iterator = CommonScriptableObjects.lastReadChatMessages.GetEnumerator())
        {
            while (iterator.MoveNext())
            {
                lastReadChatMessagesList.Add(new KeyValuePair <string, long>(iterator.Current.Key, iterator.Current.Value));
            }
        }

        PlayerPrefsUtils.SetString(PLAYER_PREFS_LAST_READ_CHAT_MESSAGES, JsonConvert.SerializeObject(lastReadChatMessagesList));
        PlayerPrefsUtils.Save();
    }
コード例 #3
0
 private void SaveLatestReadWorldChatMessagesStatus()
 {
     PlayerPrefsUtils.SetString(PLAYER_PREFS_LAST_READ_WORLD_CHAT_MESSAGES, CommonScriptableObjects.lastReadWorldChatMessages.Get().ToString());
     PlayerPrefsUtils.Save();
 }
コード例 #4
0
 public void SaveSettings()
 {
     PlayerPrefsUtils.SetString(GENERAL_SETTINGS_KEY, JsonUtility.ToJson(currentGeneralSettings));
     PlayerPrefsUtils.SetString(QUALITY_SETTINGS_KEY, JsonUtility.ToJson(currentQualitySettings));
     PlayerPrefsUtils.Save();
 }
コード例 #5
0
 private void SaveLatestOpenChats()
 {
     PlayerPrefsUtils.SetString(PLAYER_PREFS_LATEST_OPEN_CHATS, JsonConvert.SerializeObject(CommonScriptableObjects.latestOpenChats.GetList()));
     PlayerPrefsUtils.Save();
 }