question

Vignesh Gunasekaran avatar image
Vignesh Gunasekaran asked

How can I set CustomData when Matchmaking?

The GetMatchResult object has a "CutsomData" Member of type object. But I can't find any information on where and how to set this CustomData.

apisMatchmaking
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

·
Seth Du avatar image
Seth Du answered

The best place to refer API usage should be our documentation website, while according to: https://docs.microsoft.com/en-us/rest/api/playfab/multiplayer/matchmaking/getmatch?view=playfab-rest#getmatchresult, there is no CustomData defined in the GetMatchResult. I have also checked the Unity SDK to double confirm it and find that this property belongs to SharedModels instead of MultiplayerModels, which means CustomData is a separate feature apart from the GetMatch API.

To send "custom data" for the matchmaking, you may use the Attribute property when creating the match making ticket, which can be received by server instance and shared among players in the same match.

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.