question

dividerdev avatar image
dividerdev asked

Client=> GetUserData Value in Unreal Engine 5

I am trying to Pull the value of a K/V Pair from the Player Data (Title) in Unreal Engine 5. The exists and updates fine on the PlayFab Website, however when i try to pull that into the engine it always returns either 0 or nothing.

I've been having a hard time figuring out what i need to type in the GetField node in order to return the value. On the attached screenshot you'll see some of the things i have tried.

I hope someone can help.6376-playfab-playerdata.png

6377-playfab-ue5-userdata.png

apissdks
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.

dividerdev avatar image dividerdev commented ·

Something i forgot to mention in the initial post, if i use GetFieldNames array and print the contents of it, it only returns the Key, not the value. So to me it kind of seems that the Data output of the result only contains the Key and not the value? I am missing something here.

0 Likes 0 ·

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

To get the K/V Pair Json Object from the Data Property in the ClientGetUserDataResult node, you should use GetObjectFiled node with the Key to get the Value Object from the Data property, then use GetStringFiled node with “Value” fieldname to get the value of the key from the GetObjectFiled node’s Return Value property.

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.