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(); }
public static void Load(string fileName, NodeJsonHolder data) { _instance = new NodeDataManager(fileName); _instance.loadData(data); // maybe need this line }
private void loadData(NodeJsonHolder holder) { this.holder = holder; }