Duplicated PhotonViews After Disconnect
I've been banging my head against a wall for months on this as it makes zero sense, so I'm hoping someone might be able to shed some light. It seems whenever a plyer forcibly removes themselves from the game then rejoin, the other players in the room seem to get duplicated. FYI, I create these networked prefabs using PhotonNetwork.Instantiate.
Here's an example scenario:
Player1 (Steve) joins a room.
Player 2 (Sarah) joins the same room.
All is normal so far.
Player 1 (Steve) disconnected forcibly.
Player 1 (Steve) is removed from Player 2's (Sarah) game.
Again, all is normal so far.
Player 1 (Steve) reconnects.
Player 1 (Steve) is added to Player 2's (Sarah) game - This is correct.
Player 2 (Sarah) is duplicated on Player 1's (Steve) game - If I continue to disconnect Player 1 (Steve) and reconnect, Player 2 (Sarah) continues getting duplicated in Player 1's (Steve) game.
I can see that one of Player 2's (Sarah) Photon View has an ID of 2001 which matches the correct gameobject in Player 2's (Sarah) game, however the duplicate appears to have a Photon View ID of 3001. It also shows that Player 2 (Sarah) is the controller but there's no Owner or Creator in the Photon View component.
I don't understand why this is happening - It seems like Photon is caching something and incorrectly assuming it needs to reinstantiate the gameobjects when a player joins the room.
At first I thought maybe I'd forgotten to supply the AuthValues.UserId but that's not the issue.
How can I further diagnose this and find out why its happening?