Sometimes player with same name can join same room

Options
Hi
I enabled auto join lobby and I am having problems.
Some times player with same name can join. This breaks my game as photon does not send an error.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Eduard,

    Photon has an option to not allow two actors with the same UserId inside the same room. This is the default behaviour now in PUN.
    However, there is no option to disallow two actors with the same Nickname.
    You need to handle that yourself.
  • Eduard
    Eduard
    edited August 2019
    Options
    Hi
    Actually when I set PhotonNetwork.playerName same value for two players it does not allow one of them to join. But this does not happen in some cases.
    When player name is is the same as the one of the players in room, I get an error.
    I have not used UserId
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Eduard,

    PUN Classic has an exception: when you set PhotonNetwork.playerName and do not set a UserId, the playerName will be used as a UserId.