Nuance between playerList.Length & room.PlayerCount ?

Options
M4TT
M4TT
Hi
Can someone tell the difference between
PhotonNetwork.room.PlayerCount
and
PhotonNetwork.playerList.Length
Thanks

Comments

  • M4TT
    Options
    Please ?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @M4TT,

    Thank you for choosing Photon!

    They should return the same result.
    Try it yourself.
    Why do you ask?
  • M4TT
    Options
    Thanks for the reply.
    I wanted to know to use the most appropriate.
  • Hi @M4TT,

    PhotonNetwork.room.PlayerCount returns PhotonNetwork.playerList.Length. So both are basically the same. You can take a look at the Room class to see its implementation.
  • M4TT
    Options
    All right thank you