The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

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).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

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

illogiK
2016-04-18 09:02:42

Hi, you can use PhotonNetwork.playerList !

foreach (PhotonPlayer players in PhotonNetwork.playerList)
{
print(players.ID);
}

Be careful, your player is in the list too !

Ajay
2016-05-05 05:04:41

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

Back to top