Possible to Unallocate Player ID?

Options
I have a two-player game. Originally, players have the IDs 1 and 2. If player 2 disconnects then rejoins, that player now has an ID of 3, even if their objects were cleaned on disconnect. I want to guarantee that there are no "unused" Player IDs in my room. Is it possible to unallocate or manually assign a player ID?

Comments

  • Tobias
    Options
    Sorry, you have to cope with the unused IDs. In Turnbased, it's possible to come back and play on with the ID you had. PUN does not do that but it gives you the option to still have some info about players who left already.
    You can skip them relatively easy. PhotonPlayer.GetNextFor() should get you the next active player (no matter which ID).
  • Thanks Tobias. Does PhotonNetwork.otherPlayers or playerList return PhotonPlayer objects with unused IDs?
  • Tobias
    Options
    No. Only active players are in those lists.