void Awake() { //Set the default file PlayerSave.SetSaveFile(defaultSave); //Set the loaded methods _loadedSave = PlayerSave.GetSaveFile(); _loadedCrypt = PlayerSave.GetEncryptionMethod(); //Load the default save PlayerSave.Load(); }
void OnDisable() { //We have to make sure the data isn't kept in the editor as it gets really confusing. if (!Application.isPlaying) { PlayerSave.DeleteAll(); return; } //Pull out the settings and save the information before we loose it all during Serialization. _loadedCrypt = PlayerSave.GetEncryptionMethod(); _loadedSave = PlayerSave.GetSaveFile(); PlayerSave.Save(); }
/// <summary> /// Sets the current encryption method /// </summary> /// <param name="method">The encryption to set too.</param> public static void SetEncryptionMethod(SaveEncryptionMethod method) { ecnryptMethod = method; }