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

Best Answer

Answers

  • FrozenIndie
    edited September 2016
    Options
    Hey Guys I Have Found The Solution This Simple Code Put it anywhere :smile:
    void OnApplicationPause(){
    		PhotonNetwork.Disconnect ();
    	}
    	void OnApplicationQuit(){
    		PhotonNetwork.Disconnect ();
    	}