PhotonNetwork.player.NickName also sets PhotonNetwork.player.UserID

Options
I've encountered a serious bug with Photon PUN Classic where setting PhotonNetwork.player.NickName also sets PhotonNetwork.player.UserId even though it should not.

This is currently breaking matchmaking close to app launch date when two users enter the same NickName in a room.

Before I set a NickName, UserId is a Photon Cloud-generated GUID as expected.
After I set NickName, UserId has the same value as NickName.
The effect is not immediate on the next line of code, so the incorrect UserId seems to be supplied by Photon Cloud some frames later.

I am not using custom authentication.
I've thoroughly checked my project and am not setting UserId anywhere, only NickName.

Update:
I added a temporary workaround script that generates a new GUID client-side whenever local Nickname matches UserId.
Matchingmaking works again, but underlying problem still exists.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @dhewlett_purdue,

    Thank you for choosing Photon!

    This behaviour is by design in PUN1 and this was discussed here previously on the forum.
    In your case I would set a GUID as UserID from client side before connecting.