Player in PlayerList has no UserId
Options
Hello,
I have a room with two players in it.
When checking
I tried to add this code before connecting, but to no aval
Any idea why this is happening?
I have a room with two players in it.
When checking
PhotonNetwork.PlayerList, only the local player has a UserId. The other has "null". It doesn't matter if the user is the MasterClient or not.
I tried to add this code before connecting, but to no aval
if (PhotonNetwork.AuthValues == null) { PhotonNetwork.AuthValues = new AuthenticationValues(System.Guid.NewGuid().ToString()); } else { PhotonNetwork.AuthValues.UserId = System.Guid.NewGuid().ToString(); }
Any idea why this is happening?
0
Answers
-
Do you use any kind of custom authentication before connecting to photon cloud?
0 -
No, I didn't use any custom authentication apart from the bit of code above. Is it normal that the local player in PlayerList does have a UserId?
How would you recommend getting the user id of the other players in the room?
EDIT: Nevermind, I found out that I simply needed to add `RoomOptions.PublishUserId = true` when creating the room2