Speaking of mobile devices, whats the difference between those two methods? If I press the home key both are called. Is there any situation when one is called and not the other?
Since this UnityAnswer is one of the first (if not the first) to be returned on a search for OnApplicationFocus/Pause & iOS, an important update in Unity 4.6.1 has changed the behavior for iOS.
As of 4.6.1, both OnApplicationFocus and OnApplicationPause will be called in iOS.
The order is :
App initially starts:
OnApplicationFocus(true) is called
App is soft closed:
OnApplicationFocus(false) is called
OnApplicationPause(true) is called
App is brought forward after soft closing:
OnApplicationPause(false) is called
OnApplicationFocus(true) is called
Hope that helps
http://answers.unity.com/answers/970958/view.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With