private void Download(string path) { nodes.Clear(); connections.ClearValues(); properties.ClearValues(); string json = File.ReadAllText(Application.dataPath + "/" + path); NodeEditorDat dat = JsonUtility.FromJson <NodeEditorDat> (json); nodes = dat.nodes; connectionIDCount = dat.connectionIDCount; connections = dat.connections; properties = dat.propertyDict; }
private void Upload(string path) { NodeEditorDat dat = new NodeEditorDat(path, nodes, connectionIDCount, connections, properties); File.WriteAllText(Application.dataPath + "/" + path, JsonUtility.ToJson(dat)); }