question

Paloma Costa Blanco avatar image
Paloma Costa Blanco asked

How can I obtain the PlayFabID from PlayFabMultiplayerAPI.GetMatch?

Hello! I have finished this tutorial

https://api.playfab.com/docs/tutorials/landing-tournaments/matchmaking-unity-quickstart

Everything works perfectly, but I have a question: How can I obtain the PlayFabID from PlayFabMultiplayerAPI.GetMatch?

I can get EntityId from Members[i].Entity.Id, but I don't know how I can get opponent PlayFabId, because I want to hace access to opponent Data to know his equipment and other Data.

Thank you very much! :)

,

Hello! I'm following the Matchamking Unity QuickStart Tutorial:

https://api.playfab.com/docs/tutorials/landing-tournaments/matchmaking-unity-quickstart

Everything works perfectly, but I have a question: How can I obtain the PlayFabID from PlayFabMultiplayerAPI.GetMatch?I can get EntityId from Members[i]. Entity.Id, but I don't know how I can get opponent PlayFabId, because I want to hace access to opponent Data to know his equipment and other Data. Thank you very much! :)
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

·
Paloma Costa Blanco avatar image
Paloma Costa Blanco answered

Ok, after some hours I think I found a way. In the tutorial we can see:

// Here we specify the creator's attributes.
            Attributes = new MatchmakingPlayerAttributes
            {
                DataObject = new
                {
                    Skill = 24.4
                },
            },

Simply, I added the PlayFabId to the attributes:

// Here we specify the creator's attributes.
            Attributes = new MatchmakingPlayerAttributes
            {
                DataObject = new
                {
                    Skill = 24.4,

		    PlayFabId = MyplayfabId
                },
            },

And finally, in GetMatch I added this line of code, to retrieve the attributes: ReturnMemberAttributes = true

PlayFabMultiplayerAPI.GetMatch(
        new GetMatchRequest
        {
            MatchId = matchId,
            QueueName = "Pruebas",
            ReturnMemberAttributes = true,
        },

If there is another way, please tell me! :)

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.