コード例 #1
0
        public static void SaveAll(string fileName, NodeJsonHolder data)
        {
            backup(GetFullPath(fileName));

            var text = JsonUtility.ToJson(data, true);

            createFolders(GetFullPath(fileName));
            var steam = new StreamWriter(GetFullPath(fileName));

            steam.Write(text);
            steam.Close();
            AssetDatabase.Refresh();
            NodeDataManager.AfterSave();
        }
コード例 #2
0
 public static void Load(string fileName, NodeJsonHolder data)
 {
     _instance = new NodeDataManager(fileName);
     _instance.loadData(data); // maybe need this line
 }
コード例 #3
0
 private void loadData(NodeJsonHolder holder)
 {
     this.holder = holder;
 }