question

rghercioglo avatar image
rghercioglo asked

ItemInstance.CustomData is null

Hello. I can't figure out what I am doing wrong. Yesterday all was working, but today the CustomData is shown as null. In Player Inventory on site

the item is present, but nothing set in CustomData.

Player Inventory
playfab-bug.png (38.8 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.

Citrus Yan avatar image
Citrus Yan answered

The CustomData for an newly purchase item is indeed null if you don’t manually update it using the UpdateUserInventoryItemCustomData API. And, since it’s a server API, you’d need to call it from the server side, for instance, using CloudScript. For more info about CloudScript, please see: CloudScript quickstart - PlayFab | Microsoft Docs

And, these threads would be helpful:

Cloudscript Question - Playfab Community

Updating an item intances custom data - Playfab Community

10 |1200

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

rghercioglo avatar image
rghercioglo answered

OK, but there are a function named ”PurchaseItem” in PlayFabClientAPI, and it have customData parameter, what is purpose of this parameter?

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.

Citrus Yan avatar image Citrus Yan commented ·

That's not the same thing with the inventory custom data, please refer to this thread: PurchaseItem()'s customData And ExtraHeaders Parameters in Unity SDK, how do they work? - Playfab Community

0 Likes 0 ·
andel kan avatar image andel kan commented ·

I believe this customData u are taking about is catalog custom data and not item custom data

0 Likes 0 ·
rghercioglo avatar image
rghercioglo answered

I understood. Thank you all for help!

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.