Answer the question
In order to leave comments, you need to log in
How to track actions when the game is closed?
Good day. I want to track the actions of a user who closes a mobile game (application).
Need to write some PlayerPrefs after closing.
OnApplicationQuit - works fine, but only if the program is closed via Application.Quit.
If you close the game through the process killer, or often use "Close all applications" on your phone. Then the PlayerPrefs are not written (the OnApplicationQuit procedure is not executed).
Can you please tell me how can I track such an application closing? Thank you very much in advance.
Answer the question
In order to leave comments, you need to log in
Any loss of application focus is OnApplicationPause , after this event, the application can be killed by the operating system if, for example, it needs to release resources. On mobile devices, in most cases, this can be considered an exit from the application. During the transition to the browser for authorization, for example, your application is likely to be unloaded, and then restarted when returning back.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question