question

Barry McCallum avatar image
Barry McCallum asked

Extra Metadata for Player Inventory Items

Does PlayFab expose any API to be able to set or get any custom fields to Player Inventory Items?

Our game currently ties some lightweight information with the instance of different player inventory item, such as "Created On", "New/Seen", "Item Level". This is variable data that could change outside of the base definition of an item created in a catalog.

I don't see anything in the API, my suspicion is no, as it could potentially add an unbound cost to the storage of a single inventory item instance.

Player DataPlayer Inventory
10 |1200

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

Sarah Zhang avatar image
Sarah Zhang answered

Yes, PlayFab has a such API UpdateUserInventoryItemCustomData. You can find it in Server APIs, and use it on CloudScipt and Custom Servers. It is used to update the key-value pair data tagged to the specified item, which is read-only from the client. You can click the link to check the API reference.

10 |1200

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

Barry McCallum avatar image
Barry McCallum answered

Great, thanks Sarah!

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.