question

mateandor avatar image
mateandor asked

Unity UpdateUserInventoryItemCustomData()

Hello!

I try to use custom datas on inventory items ( like colors ), but i cant find how i can add or update this custom datas.

Can help me how to use UpdateUserInventoryItemCustomData() in unity?

Thanks, Andor

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

·
brendan avatar image
brendan answered

Can you clarify the question? The API call you referenced - UpdateUserInventoryItemCustomData is specifically how you would update custom data on the player's inventory item.

What are the details of the data you are trying to set?

What errors are you encountering?

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

mateandor avatar image mateandor commented ·

I have items like shoes pants etc and all this items have 2 or 3 colors. I want to set this item colors and i think to use to save this color datas in the custom data field.

When the player grant an item i set the color1-2-3 to white and later the player can choose from another colors.

I use unity but i cant reach the UpdateUserInventoryItemCustomData (i think because its a server call)

So my question is: how i can change the inventory item custom data with PlayFabClientAPI, or what i can do for this?

0 Likes 0 ·
brendan avatar image brendan mateandor commented ·

Correct - you can only set the custom data on an inventory item instance via the Server API. So the way to do this would be via Cloud Script, since it has full access to all Server API calls. That way, you can build in any protections you need to prevent cheating.

1 Like 1 ·
mateandor avatar image mateandor brendan commented ·

Thanks, i try it an works nice!

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.