- Home /
Pause Unity Acivity on back button (Android)
I've Integrated my unity project with eclipse android project. The setup is working fine. But when I press back button (when unity player is running)...the whole app exits. I've tried doing Application.quit(); in unity on back button and finishing the unity activity on android when back button pressed. The later one show my main activity for a fraction of second and then the whole application quits. I think the Unity closes the whole application when the unity activity is finished.
Can anybody give me any pointers on how can I manage to pause the unity player and then go back to my main activity? Basically I need to know how can I pause my unity player through Android code.
Thanks in advance.
I could only accomplish this by launching an intent again for my main activity when the back button is pressed....by doing this the unity player is paused and I get a kind of flicker in the view when my mainActivity is closed and relaunched...Is there really no way of doing it other than this??