private void OnApplicationFocus(bool focus) { if (focus && initialized) { PersistantSave.LoadFromPersistant(); } else { PersistantSave.SaveToPersistant(); } }
private void OnApplicationPause(bool pause) { if (pause) { PersistantSave.SaveToPersistant(); } else if (initialized) { PersistantSave.LoadFromPersistant(); } }
private void OnDestroy() => PersistantSave.SaveToPersistant();
private void OnApplicationQuit() => PersistantSave.SaveToPersistant();
private void OnDisable() => PersistantSave.SaveToPersistant();