question

Greggory Addison avatar image
Greggory Addison asked

The proper way to get & set data using “Entities” in UE5

I was looking at the docs about playfab player data and I was wondering about the entities vs the classic method of storing and retrieving data. The docs are in c# for unity and idk why but c# confuses me now lol. Haven’t used it in years Although there are some tutorials out there on getting player data they all seem to use the older method. 1. How do you properly create these entities? 2. How do you get and set data on them? 3. Best practices? 4. Code examples (Azure functions, C++, BP

Player DataTitle DataentitiesunrealCharacter Data
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

·
Xiao Zha avatar image
Xiao Zha answered

The Player Data Management APIs like Get User Data API are classic APIs not entity APIs. Every entity has a profile that contains various resources owned by that entity. And an entity profile can be retrieved directly with the Get Profile API and many other APIs operate on specific resources inside of the profile, such as Set Objects. For more information about Entities, please refer to Entity Programming Model - PlayFab | Microsoft Docs.

>>1. How do you properly create these entities?

There are some built-in Entity types like namespace, title, group, master_player_account, and title_player_account. For these entities, you don’t need to create them manually, PlayFab will automaticlly create them.

>>2. How do you get and set data on them?

You can use Data APIs like Get Objects, Set Objects, Get Files and so on that you can use to get and set data on the entities.

>>3. Best practices? 4. Code examples (Azure functions, C++, BP

We don’t have best practices and code examples for UE5. But since PlayFab is based on RESTful API. So the APIs in the PlayFab SDK of different platforms are not very different in usage. So you can refer to the C# code examples: Entity files - PlayFab | Microsoft Docs and Use entity objects to store player data - PlayFab | Microsoft Docs.

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.