|
There are lots of answers suggesting using OnApplicationPause for doing stuff when the application goes out of focus (for instance, when the Home button on the iPhone is pushed). We don't see that this function is called. Does this in fact work, or do you need magic to make it so? If not, why does so many answers suggest it, and how do those answer get accepted? Edit: And why is none of this in the documentation, Unity guys? Edit: We need a solution for iPhone (and Android). More info: The OnApplicationPause does get called for PC (with RunInBackground switched off), and on iPhone when we put it in the class that directly extends from Monobehaviour (in our system, called DebuggableManobehaviour), but not in any classes that extend from DebuggableManobehaviour (which is all the game classes in our project). TIA ht
(comments are locked)
|
|
If the player is paused, OnApplicationPause should be called. If it isn't, that's a bug, you should file it. Is your player actually pausing? Maybe you have the run in Background checkbox enabled? Thanks, Jonas. I only see the option for Windows and Web player. Is it at all available for iPhone? We can see that the UnityPause (AppController.mm) function is called in from the Unity-generated XCode, but for some reason the OnApplicationPause does not reach our application.
Jan 19 '11 at 02:42 PM
Herman Tulleken
Jonas, we have narrowed the issue down (see my updated question), so you are right, this is a nasty little bug, at least one with a workaround, however annoying it is. We will file a bug report. Thanks for the "run in background" info (it would be handy if that could be in the docs under the OnApplicationPaused description...)
Jan 19 '11 at 03:15 PM
Herman Tulleken
(comments are locked)
|
iPhone can work. but iPod doesn't work well.. Android doesn't support. you must create plugin
(comments are locked)
|

Hi Herman,
Did you fix this issue??? I have the same problem, my application still running in background when is interrupt with lock or home button.
I'll really apreciate if you can tell me what you did to solve this problem and pause calling OnApplicationPause method.
Thanks.