question

Riccardo Iengo avatar image
Riccardo Iengo asked

Send a struct to Playfab - UE4

Hey there!

I'm working on a ghost race and I need to send a struct over to Playfab.

What I normally do is, to add (Location and Rotation) of my vehicle to this struct and save it in order to replay my race when I start a new race.

How can I set this via Playfab? I just need to store lot of coordinates and load them when I need it.
(like in the .png)


The struct should act just like a "save game", nothing should be done while racing!!!

record.png

record.png (88.3 KiB)
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

Yes, you may construct a PlayFab JSON object as the value of attribute “Data” in UpdateUserReadOnlyData API request. Please also note that Player Read-Only Data cannot be updated by client API. It is recommended to implement in the Cloud Script/Azure function, where the Timestamp or Location/Rotation can be verified according to your requirement. In this case, the data should be sent via attribute FunctionParameter in the request.

In addition, it is also recommended to use 3-rd party JSON Plugin to serialized data to store as a string.

2 comments
10 |1200

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

Riccardo Iengo avatar image Riccardo Iengo commented ·

Very useful, thanks. Could you provide me an example on how should I set the read-only script?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Riccardo Iengo commented ·

I am not very familiar with C++, however, the usage is the same as C++ standalone SDK --Quickstart C++ for Windows - PlayFab | Microsoft Docs. Do you need a Blueprint sample?

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.