How can i get all connected photon player view id on button click ?
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).
How can i get all connected photon player view id on button click ?
Ajay
2016-04-11 07:36:05
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
Comments
Hi, you can use PhotonNetwork.playerList !
foreach (PhotonPlayer players in PhotonNetwork.playerList)
{
print(players.ID);
}
Be careful, your player is in the list too !
hi
thanks for the answer.
Is the photon player id and photon player view id is same things ?
gautam_ajeet
2018-01-17 08:57:17
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-id