PUN 2 - Get Custom Properties Of Players
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).
PUN 2 - Get Custom Properties Of Players
omard2000
2018-12-25 17:33:59
Hi everyone,
I tried looking for documentation to find my solution to this but have had no luck. I am trying to access each player's custom properties to check their team.
this is what I want: PhotonNetwork.Player.GetCustomProperties["Team"].ToString();
How can I do this in PUN2?
Thank you!
Comments
Hi @omard2000,
Thank you for choosing Photon!
You can get the list of players using PhotonNetwork.PlayerList.
For each player (element of that array), you can get the custom properties using Player.CustomProperties.
for(int i=0; i
@JohnTube Thank you! :smiley:
Back to top