/// <summary> /// When app is paused (e.g., minimized) and saveOnPause is true, save game. /// </summary> /// <param name="paused">True indicates game is being paused.</param> private void OnApplicationPause(bool paused) { if (enabled && paused && saveOnPause && CanSaveInThisScene()) { SaveSystem.SaveToSlotImmediate(saveSlotNumber); } }
/// <summary> /// When app loses focus and saveOnLoseFocus is true, save the game. /// </summary> /// <param name="focusStatus">False indicates game is losing focus.</param> void OnApplicationFocus(bool focusStatus) { if (enabled && saveOnLoseFocus && focusStatus == false && CanSaveInThisScene()) { SaveSystem.SaveToSlotImmediate(saveSlotNumber); } }
private void CheckSaveOnQuit() { if (enabled && saveOnQuit && CanSaveInThisScene()) { SaveSystem.SaveToSlotImmediate(saveSlotNumber); } }