What to use to identify a player in a room?
Options
Hello There,
It seems that player number is not the same on every client, like player1 might be numbered as 1 on one client and 2 on another one, please correct me if I'm wrong about this?
If yes, is there any other unique identifier which I can use to identify a player (within players in the same room, not within the whole players connected) ?
Thanks,
Özden
It seems that player number is not the same on every client, like player1 might be numbered as 1 on one client and 2 on another one, please correct me if I'm wrong about this?
If yes, is there any other unique identifier which I can use to identify a player (within players in the same room, not within the whole players connected) ?
Thanks,
Özden
0
Comments
-
Hi There,
Could you please tell me the class name and method to get the actor number (iOS C++ SDK)? I used Player class getNumber method but as I said, it seems the numbers vary on different clients. I couldn't find anything about UserID as well (property or method).
Thanks..0 -
Hi @Ozden79.
Player::getNumber() is the correct function() for that purpose.
You can get the userID through Client::getUserID() and you can set it through the Authentication values that you pass in on connect.
Please be aware that player numbers are only unique per game room, not per app, so if a player switches rooms his player number may change.0