- Home /
Detect iphone switching appliction.
Hey all.
I want to detect if the user on the Iphone switches from my game to other application (Multitasking). This way when the user comes back to the game i can pause the game.
I need something to detected that the user has switched from game to other application and back to the game.
Answer by Mike 3 · Jun 24, 2010 at 02:48 PM
There should be a MonoBehaviour event which is called when it happens
I think it's OnApplicationPause
Check the MonoBehaviour docs in the Script Reference (the local one on your hard drive for iphone), it should have it in there, as well as the one for when it's unpaused
Thx it works. Sorry for late response. I was on vacation.
Answer by Tetrad · Jun 24, 2010 at 02:40 PM
If you want to support multitasking, you're going to have to do it with a native plugin.
It's mostly going to be handled on the Objective-C side, and you can do things like use UnitySendMessage to send a message to a specific game object telling you about the application switching.
Your answer
Follow this Question
Related Questions
iPhone app stuck after multitasking 0 Answers
Multitasking on iphone? 1 Answer
Can Unity 3 build for the iOS Simulator? 2 Answers
WHAT licence for Iphone DEV 2 Answers