I'm developing an app that integrates with Unity3d, in some part of my code I call an UnityPlayerActivity that starts the Unity3d code. When user finishes using the Unity3d he press a button and go back to Android code. My problem is when I go back to android code, after UnityPlayerActivity calls:
@Override protected void onDestroy ()
{
mUnityPlayer.quit();
super.onDestroy();
}
The application is closed, not only the Unity Activity. I could not call this method, but I think that would be wasting memory.
Is there any way I could quit only Unity3d activity and keep my application running normally so I could start Unity3d part again another time?
Tks
Found an answer. Just need to use another process on manifest.
Basically means, you have to explicitly name your Activity
process in your AndroidManifest.xml
.
For instance.
<activity
android:name=".UnityPreviewActivity"
android:process=".UnityPreviewActivity" />
Reference
http://answers.unity3d.com/questions/587979/how-do-i-stop-munityplayerquit-closing-the-entire.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With