I just run into a slight problem with iOS4. It seems OnApplicationQuit is not called if the user shuts down the app when it’s running in the background. This is pretty understandable, but the problem is that I use OnApplicationQuit to save the game’s state so that the user can easily continue from where he left of the last time. Obviously this is not the optimal solution anymore. So,
Is there a way to call a function when the application is quit on the background?
Is there a way to a call a function when the game is moved to the background?
Yes, I figured that out eventually. I didn’t think there was an out of the box solution since IIRC, iOS4 beta wasn’t even out when the 1.6 version I’m using was released. Do you employ seers or did I just remember incorrectly?
I am using Unity 3.3 and the OnApplicationQuit is not being called at least for the iphone platform. This is a big problem because I am saving variables and releasing memory on those functions. Is this an already known bug? Has anyone fixed it?