question

i02recav avatar image
i02recav asked

playfab matchmaking. Get Ip attributes from tickets,Playfab Matchmaking. Get attributes of tickets to pass server IP

Hi.

Im trying access to IP value of tickets attributes. I created Ip value in the DataObject of ticket attributes. In the getmatch, i included ReturnMemberAttributes as true in GetMatchRequest.

Now OnGetMatch i try to access ip data with GetMatchResult obj.Members[0].Attributes.DataObject but no i hadnt result in Debug.Log. I dont know how to access to attributes data. I was searching for some day without result and im front a wall. I need your help.

Im working in Unity with c#. My goal is pass ip of the first members (the server) to others players during playfab matchmaking.

Thankyou verymuch.

,

Hi.

Im trying to get Ip value from the attributes of the tickets. I put the data y the DataObject of the attributes when i create the ticket.

When I do the getmatch, I put ReturnMemberAttributes as true.

OnGetMatch, i try to access to this value with GetMatchResult obj.Members[0].Attributes.DataObject but no result appear with a Debug.Log. I dont know how access to this data. I have been searching but I didnt get result. I need your help.

My goal is pass the ip of the first ticket to the other players. Im working with unity in c#.

Thankyou verymuch.

Player DataMatchmaking
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

·
Sarah Zhang avatar image
Sarah Zhang answered

Could you please clarify that how you set the EscapeObject field of the API GetMatch?

If you set the EscapeObject as false, this API would only return the DataObject. You can get the DataObject using your code snippet. To display it in the Debug.Log, you would also need to call the ToString() function for it.

If you set the EscapeObject as true, this API would only return the EscapedDataObject without returning DataObject. Since the DataObject isn’t returned, in this situation, you can only get the EscapedDataObject.

For your case, if you set the EscapeObject as true, your API result won’t contain DataObject, so your code may return the “Null reference” error. Did you get this error?

1 comment
10 |1200

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

i02recav avatar image i02recav commented ·

its just I need!! billions of thanks!!

0 Likes 0 ·

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.