- Home /
Embedding unity into existing android app: UnityPlayer.quit kills app process
I successfully embedded my Unity scene in one of the activities of our existing Android app. It's not a top activity, so the back stack looks like: Main -> Some other activity -> Unity activity.
Now I want a user to return to "Some other activity" when they press Back button while in the Unity activity. However, UnityPlayer.quit actually sends -9 signal to the process after performing an engine shutdown. This kills the whole app.
What can I do to shutdown the engine without killing the process? Something like Application.Unload
(which I didn't try yet because the docs say: "Only supported on iOS and Windows Store.")...
I'm aware of starting activities in different processes. But this has other negative implications...
Your answer
![](https://koobas.hobune.stream/wayback/20220612151544im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Why does onDestroy in UnityPlayerActivity kill the entire process (Android) 4 Answers
How do i stop mUnityPlayer.quit() closing the entire android app? 1 Answer
UnityPlayer in an Android MapActivity 3 Answers
How to keep other activities on top after pressing the home button on Android? 0 Answers
Android/Unity - Launching activity from unity activity 5 Answers