question

brendan-1 avatar image
brendan-1 asked

Is there a way for the client (player) to access/get a list of all of the players in the current same title?

I have a unity application in which I have in-game "admins" that need to be able to view a list of all players and view their details (all details inside of one key | value pair, where the "pair" is a JSON object).
I would also like the in-game "admins" to be able to search through these users by one of the values in the JSON object. For example, each player has a "Profile" key, which has a corresponding JSON value containing "Email, Level, and Gold"; I want my "admins" to be able to search through the list of users by searching their email.

I know leaderboards exist; however, I feel there should be another/better way (possible segments?)
I am trying to avoid building a separate database.

unity3d
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

·
Xiao Zha avatar image
Xiao Zha answered

Using Get Players In Segment API and All Players segment you can get profiles for up to 10,000 players in the current same title. But PlayFab does not support custom search feature right now. You can try to post a feature request about it , more votes from other users can help with the priority. And If you just want to search for players via email, you can use Get User Account InfoAPI in an Azure Function to achieve this functionality.

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

brendan-1 avatar image brendan-1 commented ·

Hello, thank you for the quick reply. I am new to PlayFab services, so I apologize if these questions are answered elsewhere; I tried searching for answers first.

Is there a way to call GetPlayersInSegment from PlayFabClientAPI (from the client) or is this something I need to have a cloud script handle? If so, I will have to do some more research on how to use the Cloud script functions.

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha brendan-1 commented ·

The GetPlayersInSegment API is designed to be used on the server side and it cannot be called from PlayFabClientAPI. So you need to have a cloud script handle or you can use it in an Azure Function.

1 Like 1 ·

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.