How can i get all connected photon player view id on button click ?
Options
Hi...
Hope you are doing well.
The players that are conected in room who has view id. I need to get all players id in single list. I can get it with hit, but without hit i need to find on button event and also how can i retrieve view id of player that quits.
Thank you
Hope you are doing well.
The players that are conected in room who has view id. I need to get all players id in single list. I can get it with hit, but without hit i need to find on button event and also how can i retrieve view id of player that quits.
Thank you
0
Answers
-
Hi, you can use PhotonNetwork.playerList !
foreach (PhotonPlayer players in PhotonNetwork.playerList)
{
print(players.ID);
}
Be careful, your player is in the list too !0 -
hi
thanks for the answer.
Is the photon player id and photon player view id is same things ?
0 -
No they are not the same. Go through following thread to find out
https://forum.photonengine.com/discussion/10222/difference-between-photonview-viewid-and-photonnetwork-player-id0