PlayMaker Feedback > Feature Requests

New Global Events - onApplicationQuit/Pause/Focus[SOLVED]

(1/2) > >>

Jos Yule:
It would be great if we could have onApplicationQuit, onApplicationPause and onApplicationFocus as global events in PM.

For iOS dev, it is important to be able to react to the onApplicationPause event (and its parameter), so you can save any state you need to. This is triggered when the user receives an incoming call, or hits the HOME button.

Really, onApplicationPause is the most important to me, then onApplicationQuit and finally onApplicationFocus (i'm not at all sure of what it does or when it fires, at least on iOS).

smiffy:
Agreed, for Android too this is essential. This issue is actually the only thing our publisher is holding us back on as we can't resume to a pause menu from an interrupt. How easy would this be to implement?

jeanfabre:
Hi,

 ok, can you try the following script? attach it to anything, an empty gameObject will do.

In your fsm, create the following Global events:

APPLICATION QUIT
APPLICATION PAUSE
APPLICATION FOCUS

What this script will do, is simply broadcast them three global events, so that any fsm can now be informed about them events.

 If you have problems implementing this, let me know, and I'll do a sample

bye,

 Jean

smiffy:
It works on android thankyou! Major sigh of relief. Just got to tie it in with the rest of the game and I can re-submit, honestly I can't thank you enough :D

akdhane:
Hi,

I am trying to use your script to do onapplicationpause function. However,

because of my lack of knowledge of programming and others. I am having

trouble implementing your script. If you can give me sample scene it will be

 great.

Thank you.

Allen.

Navigation

[0] Message Index

[#] Next page

Go to full version