Problem On Leaving On Android
Options
I have My Unity Game Working with (PUN) and it's on Android , The Problem is most of people when they quit a game they are just click the home button and everything goes ok , but when i click on home button the play doesn't leave and it keeps sending the last state for moving unless i open the applications menu and close it and even after doing this it's taking some time to make the player disappear and this is very annoying i hope that any one have some kind of fix
0
Best Answer
-
Hi @FrozenIndie,
Thank you for sharing this.
There is also another way of avoiding background thread.
Maybe it should be disabled or the background timeout should be set to 0. You can do that usingPhotonNetwork.BackgroundTimeout
.
Do you setApplication.runInBackground
to true?5
Answers
-
Hey Guys I Have Found The Solution This Simple Code Put it anywhere
void OnApplicationPause(){ PhotonNetwork.Disconnect (); } void OnApplicationQuit(){ PhotonNetwork.Disconnect (); }
0 -
Hi @FrozenIndie,
Thank you for sharing this.
There is also another way of avoiding background thread.
Maybe it should be disabled or the background timeout should be set to 0. You can do that usingPhotonNetwork.BackgroundTimeout
.
Do you setApplication.runInBackground
to true?5