void OnApplicationPause(bool pauseStatus) { if (pauseStatus) { // save data to file DataSerializer.Apply(); } }
void OnApplicationQuit() { // save data to file DataSerializer.Apply(); }