Currently evaluating the best way to store player data in PlayFab for our game. I noticed the new entity system and I'd like to use it, the problem is as follows:
Player save is made of 10 JSON from 500 bytes to 3 KB.
Since the entity objects max count on my plan is 5 I could merge the data to only have 5 JSON but the limit of 1000 bytes per entity object will be exceeded by 1 to 3 KB.
What would be the best way in your opinion ? I could store those 10 JSON as entity files but since it's not even 5 KB for each file it would not meet the ideal requirements for using entity files.
Should I use the legacy player data key/value in this case ? Thanks
Answer by Rick Chen · Feb 18, 2021 at 07:17 AM
The Entity Objects are used to read and write small JSON-serializable objects attached to an entity. Yes, you could use the Key/Value pair data or entity files to store the data instead. Entity files allow you to read and write files attached to an entity in any format. Player data allows you to store Key/Value pair data for players, there are 3 modes of access to player data which allows you to control the access of the data. You can choose either of them based on what you are trying to achieve. For more detail please refer to: Entity objects, Entity files, Player Data.
I'll use Player data then since entity objects 1000 bytes limit is too small. Thanks
Sorry, but can I be honest by saying that this new Entity model is a real step backwards for this service. Docs seem to insinuate that this is what we should be using but really it just makes things more complicated. Entity Objects seem great until you hear they have a 1000 byte limit. No problem, we can use the entity files. Oh, entity files requires 3 API calls to write a file. Fantastic. I understand there are probably numerous benefits to this feature in the backend of things, but for us users it's just complicated and frustrating trying to do something that used to be simple.
Trouble uploading a text file as an entity file onto playfab. 1 Answer
Upload JSON file Unity (entity) 2 Answers
UserData Questions 1 Answer
Player data limit 1 Answer