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

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.

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 ?

2016-04-11 07:36:05


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


2016-04-18 09:02:42

Hi, you can use PhotonNetwork.playerList !

foreach (PhotonPlayer players in PhotonNetwork.playerList)

Be careful, your player is in the list too !

2016-05-05 05:04:41

thanks for the answer.
Is the photon player id and photon player view id is same things ?

2018-01-17 08:57:17

No they are not the same. Go through following thread to find out ;)

Back to top