question

David Jones avatar image
David Jones asked

Photon player properties

Hi, so what I'm trying to accomplish is having a few custom properties on a player that persist from when they start the game so that when they join a photon room it places them into a "lobby" that I made with UI and on the UI it will have information such as their username, playfab statistics like Wins and Rating. I'm having no problem posting these things for the local player but I can't wrap my head around how I would get their opponents info to show up whenever they join the room. Would customPlayerProperties be the best route?

unity3dphoton
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Hernando avatar image
Hernando answered

It seems that you would like to get profile and statistics of other players, based on our past experience, customPlayerProperties would be a good choice to share information in the room. Actually, in PlayFab, you can also receive these data through the player's PlayFabID, Statistics can be received using GetLeaderboardAroundPlayer, Username via GetUserAccountInfo. However, have to be aware of is if there are many player in the room, that will make a lot of requests in a short time, and it would result in us having to throttle your title.

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Jones avatar image David Jones commented ·

Thank you, and what exactly do you mean when you say I can fetch the values through their playfabid?

0 Likes 0 ·
David Jones avatar image David Jones David Jones commented ·

And where would be a good place to set the keys? When the user creates a room or creates their account?

0 Likes 0 ·
David Jones avatar image David Jones David Jones commented ·

Okay after reading some more posts I now understand that player properties are only instanced through a room. So when the player joins the room i can just add the key and the value every time?

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.