Can't make any damage to a player when he is in background

Options
I made a mobile fighting game with PUN,but I found that when a player pressed home button and game is in background, he takes no damage , and another question: when a player is offline,his character in game will be deleted, this is what I don't want to see.Help me,please!

Comments

  • Hi @hxfdean,

    when the application is in background it is paused automatically on mobile devices, which means that the local player doesn't process anything. How do you deal damage to another player?

    when a player is offline,his character in game will be deleted, this is what I don't want to see.


    There is an option to turn this behaviour off. In your code you have to set PhotonNetwork.autoCleanUpPlayerObjects = false; before creating or joining a room in order to prevent removing network instantiated objects if the creator leaves the room. Please note that you have to clean up those objects manually later on if you have to.