- Home /
Switching between apps in Android causes Unity Player to start over and drops any network connections to server
Hello,
I've got a strange behaviour of the UnityPlayer on Android. Sometimes the app runs in background correctly sometimes not. E.g. when user want to rate my app and opened Play Market and then returned back to game either with 'back' button or thru the list of running apps the game is started again instead of continue from the previous state. I am using Unity 5.5.03f. I've changed in manifest file main activity name from default UnityPlayerActivity to previous used UnityPlayerNativeActivity but I've got the same unpredictable behaviour. Does the UnityPlayer saves its state or I should handle it by myself. If so then what should I do?
Thanks in advance!
Answer by OusedGames · Feb 16, 2017 at 02:36 PM
Hello
Enter your player settings
Resolution and Presentation
Check "Run in Background"
Hope it works
Thanks for a reply. But does runInBackground can be applied to the android builds? And what do you mean by "enter player settings"? $$anonymous$$y settings for RnP: Portrait, 32 bit.
Sorry!! I forgot that Run In Background only works on PC build
Your answer
Follow this Question
Related Questions
Is there a way to export an android app (apk) that asks for no permissions at all? 0 Answers
Android Building Error 0 Answers
Too many method references; max is 65536. 4 Answers
Script controlled values in UI text elements not appearing in Android builds 0 Answers
Unexpected behaviour after adding animator and Unity editor crash 0 Answers