Unique ID
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Unique ID
ruse
2018-11-24 14:30:57
How can i give all the players a unique id like 1,2 or 3 etc.?
Comments
[Deleted User]
2018-12-04 16:19:25
Hi @ruse,
when in a room, a client has a unique number: the Actor Number. You can access it on the local player by using PhotonNetwork.LocalPlayer.ActorNumber
.
Hi @ruse,
Thank you for choosing Photon!
You could also try "PlayerNumbering" component if you do not want ActorNumber to go beyond MaxPlayers and recycle/rotate/reuse the numbers if you allow players leaving and others joining instead.
Back to top