OnDisable and OnDestroy are not getting called on iOS. I have added these two methods in MonoBehaviour object which get destroyed when game is closed.
Which ever data I was storing at game close time that not become available at next game launch time. So,I realize that these two methods were not working.
Any solution for this?
void OnDisable()
{
Debug.Log("*************************** OnDisable");
DataStorage.StoreLastOpenedDay(DateTime.Now.Day);
DataStorage.StoreLastOpenedMonth(DateTime.Now.Month);
DataStorage.StoreLastOpenedYear(DateTime.Now.Year);
}
void OnDestroy()
{
Debug.Log("*************************** OnDestroy");
DataStorage.StoreLastOpenedDay(DateTime.Now.Day);
DataStorage.StoreLastOpenedMonth(DateTime.Now.Month);
DataStorage.StoreLastOpenedYear(DateTime.Now.Year);
}