Exemplo n.º 1
0
        public static DialogEditorData GetDataDialogEditor(string _path)
        {
            //reader = new StreamReader(path + _fileName);
            reader = new StreamReader(_path);
            string           JsonString = reader.ReadToEnd();
            DialogEditorData data       = JsonUtility.FromJson <DialogEditorData>(JsonString);

            reader.Close();
            return(data);
        }
Exemplo n.º 2
0
        public static void SaveDataDialogEditor(string _path)
        {
            DialogEditorData data = new DialogEditorData(DialogEditor.Instance);

            string completePath = _path;

            if (File.Exists(completePath))
            {
                File.Delete(_path);
                AssetDatabase.Refresh();
            }
            writer = new StreamWriter(_path, false);
            writer.Write(JsonUtility.ToJson(data));
            writer.Close();
        }