How can i get and print the display name or username of joined player from members array? Or is there any other way to get all the joined players display name in a multiplayer server
How can i get and print the display name or username of joined player from members array? Or is there any other way to get all the joined players display name in a multiplayer server
When a player tries to create a ticket, you can use the Api "GetPlayerProfile" to get the player's display name, the following is the request body ({ {PlayFabId}} refers to the specific PlayFabId).
{
"PlayFabId": "{
{PlayFabId}}",
"PlayerProfileModel":"DisplayName"
}
Then you can add the display name to "MatchmakingPlayerAttributes" in api "CreateMatchmakingTicket", following is an example of request body.
{"Creator": { "Attributes":{"DataObject":{"displayname":DisplayName}},"Entity":currentEntity},
"MembersToMatchWith": [],
"GiveUpAfterSeconds": 100,
"QueueName": "pk"
}
Finally, it will appear in the result of the Api "GetMatch". For the operation in BluePrint, You may refer to Unreal Engine quickstart - PlayFab | Microsoft Learn or seek professional assistance from Unreal Engine support team.
42 People are following this question.