Пример #1
0
        /// <summary>
        /// 이 인스턴스를 Json으로 Serialize화 하여 PlayerPrefs에 저장.
        /// </summary>
        public void Save()
        {
            Type   thisType    = this.GetType();
            string registerKey = string.Format("{0}{1}", s_strLocalPrefsRoot, thisType.Name);
            string toJson      = JsonMapper.ToJson(this);

            if (Application.isPlaying == true)
            {
                Debug.Log(string.Format("LocalPrefsContainer.cs: Save() -> {0}", toJson));
            }

            PlayerPrefs.SetString(registerKey, toJson);

#if UNITY_EDITOR
            LocalPrefsViewer.Refresh();
#endif
        }
Пример #2
0
 public static void Open()
 {
     instance = GetWindow <LocalPrefsViewer>(false, "Prefs Viewer", true);
     instance.Show();
 }