question

Peter Wiseman avatar image
Peter Wiseman asked

Player IDs in OnMatchmakingTicketCompleted when player's matched ?

I'm able to match two players into a 1v1 game using the Unity multiplayer SDK and my OnMatchmakingTicketCompleted is called. Is there any way to obtain each of the player's PlayFab IDs from MatchmakingMatchDetails details = ticket.GetMatchDetails(); ? All I can see is some EntityKey in the details.Members list and I don't really know what use that is to me ? I'm getting around this by passing each of the player's IDs into their attributes when the match ticket is created and that works fine but I'm wondering whether that's the "correct" way to do things ? Is there any way to obtain each of the player's PlayFab IDs from their EntityKeys in OnMatchmakingTicketCompleted when they're matched together ?

unity3dmultiplayer
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

·
Gosen Gao avatar image
Gosen Gao answered

The PlayFabId is “master player account” id and the entity id in Members list is “title player account” id, you can refer to Available Built-In Entity Types - PlayFab | Microsoft Learn. You can use Account Management - Get Profiles - REST API (PlayFab Profiles) | Microsoft Learn with a list of title player account ids to get their master player account ids. Passing the PlayFabId into attributes when creating the Ticket is also a solution, you can keep using it.

10 |1200

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

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.