I tried to look for the answer online but no one helps me
My problem is i want to save PlayerPrefs when the player close the application not using my game exit button. It doesnt save the data in Android. But it works perfectly in Unity editor. Please help thanks…
btw sorry for bad english.
OnApplicationPause corresponds to onPause/onResume events of the activity. OnApplicationQuit corresponds to onDestroy event of activity lifecycle.
According to android docs, you are guaranteed to get a call back for onPause but anything after it may not be called. Therefore, you may not get a call to OnApplicationQuit if Android destroys the activity after onPause(Pre Honeycomb) or onStop.