Unity Community |

I'm trying to figure out how to call a function when my iOS application is coming back from background. I have read through som posts I can use "OnApplicationPause" but not sure how to do so when coming back from background... Can anybody help?
Thanks in advance![]()
http://unity3d.com/support/documenta...tionPause.html
It sends a bool telling you if it's entering foreground/background.
New to this part of Unity... So where/what does is say foreground/background?http://unity3d.com/support/documenta...tionPause.html
It sends a bool telling you if it's entering foreground/background.
function OnApplicationPause (pause : boolean) : void
I have tried this:
Code:
game_message = true; }
That works when the application goes into sleep... But I want to run the game_message = true; when the application wakes up again! How do I do this?
Hooping for help![]()
Code:
if (pause) { // Put code in here that you want to run when the game enters background. } else { // Put code in here that you want to run when the game enters foreground. } }
I would also try OnApplicationFocus.