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)); }
public void OnSave() { SerializationManager.Save(saveName, SaveData.current); Debug.Log("Game Saved"); }