コード例 #1
0
        public void Save()
        {
            last = this;
            string filesPath = Application.streamingAssetsPath + "/" + AssetManagerSetting.GameConstName;

            Save(filesPath);
            UnityEditor.AssetDatabase.Refresh();
            Debug.Log("[GameConstJsonGenerator]" + filesPath);
        }
コード例 #2
0
        public static GameConstConfig Load(string path)
        {
            var f = new FileInfo(path);

            if (f.Exists)
            {
                var sr  = f.OpenText();
                var str = sr.ReadToEnd();
                sr.Close();

                GameConstConfig config = JsonUtility.FromJson <GameConstConfig>(str);
                return(config);
            }
            else
            {
                return(new GameConstConfig());
            }
        }
コード例 #3
0
        public static void Generator()
        {
            GameConstConfig obj = new GameConstConfig();

            obj.Save();
        }
コード例 #4
0
        public static GameConstConfig Load()
        {
            string filesPath = Application.streamingAssetsPath + "/" + AssetManagerSetting.GameConstName;

            return(last = Load(filesPath));
        }