Exemple #1
0
        /// <summary>
        /// Save every local and global variable value (that are marked as Saveable)
        /// </summary>
        public void Load()
        {
            if (mode == Mode.PlayerPrefs)
            {
                DialogueSystemSaveLoad.LoadFromPlayerPrefs();
            }

            else if (mode == Mode.File)
            {
                string path = Path.Combine(Application.dataPath, FileName + ".save");
                string data = File.ReadAllText(path);
                DialogueSystemSaveLoad.DeserializeFromString(data);
            }
        }
Exemple #2
0
        /// <summary>
        /// Save every local and global variable value (that are marked as Saveable)
        /// </summary>
        public void Save()
        {
            if (mode == Mode.PlayerPrefs)
            {
                DialogueSystemSaveLoad.SaveToPlayerPrefs();
            }

            else if (mode == Mode.File)
            {
                string data = DialogueSystemSaveLoad.SerializeToString();
                string path = Path.Combine(Application.dataPath, FileName + ".save");
                File.WriteAllText(path, data);

                RunemarkDebug.Log("Saved to " + path);
            }
        }