- Home /
Proper way for Quit Application
Hello, I am doing Android game in which I have implemented Admob and IAP from Unity. When everything is set up and I quit app with Application.Quit() and launch again, it takes 5 more seconds until Splash Screen shows.
This says LogCat: Timeout while trying to pause the Unity Engine. When I relaunch app without Admob and IAP plugins everything works. So I think problem is that Application.Quit() quit app but Admob and IAP plugins are still running and when I relaunch app Android have to "Kill" plugins and start whole game again can it be true? I have tested System.Diagnostics.Process.GetCurrentProcess().Kill() and it worked but I read it is not recommended to use.
Please can you advice me how can I solve Application.Quit() problem or is it fine to use System.Diagnostics.Process.GetCurrentProcess().Kill() or how should be app quit? And 1 more question, does Application.Quit and System.Diagnostics.Process.GetCurrentProcess().Kill() work on iOS?
Answer by Menyus777 · Jul 17, 2017 at 11:14 PM
I read somewhere in the documentation that it is not adviced to use Application.Quit() and let the OP System decide when to close it, and for IOS application.Quit() is forbidden in some case https://developer.apple.com/library/content/qa/qa1561/_index.html