Player joining or rejoining a room seeing all previously destroyed objects.

I'm having an issue when my player joins the room all the destroyed objects from previous gameplay (old players and destroyed objects) all seemed to be spawned it. It fixes itself after the round resets if they stay in the room, but I'm not sure why this is happening.


For destroying these instantiated objects I'm sending an rpc to all clients and having the owner destroy them.


I'm not sure how to stop all of these items instantiating for new players any help would be amazing. I think I'm just misunderstanding something common about making levels.

Best Answer

  • Tobias
    Tobias admin
    Accepted Answer

    If you use PhotonNetwork.Instantiate to create networked objects, you should use PhotonNetwork.Destroy to get rid of them. Sending an RPC will not correctly update the server about the destroy. This may be the root of the problems.

Answers

  • Tobias
    Tobias admin
    Accepted Answer

    If you use PhotonNetwork.Instantiate to create networked objects, you should use PhotonNetwork.Destroy to get rid of them. Sending an RPC will not correctly update the server about the destroy. This may be the root of the problems.