Actor Number

Hello everyone,
I want to get list of players Respectively (Who Comes first, who comes second, ...), then I use PhotonNetwork.ActorNumber. but i notice that when there is no person in room and just one person enter room and leave the room, number of actor is 1(and this is correct) but (when there is two user in a room) another person from other pc joins the room and leave and again join the room, Actor number doesnt decrease and always increase. is this a bug? or is there any other solution?

Thanks

Comments

  • emotitronemotitron ✭✭
    What are you using to get this "Actor Number"?

    When a new player joins, they are given a new number, and numbers are not recycled.

    So if player 1 forms a room, and player 2 joins.... then player 2 leaves...

    the next person who joins will be given Actor Id of 3.

    It isn't meant as a player count, it is just a unique id for each player that has joined.
  • Hi @Ehsan_AK,

    Thank you for choosing Photon!

    What you need is "Assets\Photon\PhotonUnityNetworking\UtilityScripts\PhotonPlayer\PlayerNumbering.csé.
    It will give you player number per player use it instead of actor number.
Sign In or Register to comment.