Пример #1
0
        public static string Save(object data, string saveName, string scene)
        {
            CheckValidity(saveName);
            string name     = GetSaveName(saveName, scene);
            string existing = GetLastSave(saveName, scene);

            if (!String.IsNullOrEmpty(existing))
            {
                File.Delete(existing);
            }
            return(SerializationManager.Save(name, data));
        }
Пример #2
0
 public void OnSave()
 {
     SerializationManager.Save(saveName, SaveData.current);
     Debug.Log("Game Saved");
 }