GetInventoryItems for client api and GetUserInventory for server api returns "null" instead of Custom item data. Item in game manager => http://puu.sh/q83Xh/d06e8e7847.png Incoming item in client api => http://puu.sh/q843E/50f0275e9f.png and from cloud script log => http://puu.sh/q847b/0dd1f45d9c.png
Answer by Brendan · Jul 20, 2016 at 04:13 PM
CustomData in the catalog is global - you read it from that source, so that it applies equally to all instances. When you instance an item, you have the ability to set unique CustomData on it - that would be distinct from the catalog CustomData. Please have a look at this post for more info: https://community.playfab.com/questions/3752/read-custom-data-from-iteminstance.html.
Oh, sorry for my inattention. Thanx alot. Now it's clear how all this stuff works. One more question. Does server requests, such as GetCatalogItems caches in cloud script? Or how i can cache this stuff. I need to hadle a catalog items, user items, user currencies and some of game title data in one call and getting all theese stuff wastes alot of time. So i think about some caching for data which is not changes. Thanx alot again.
In general, yes, we would recommend caching all of that on the client. You can read global items like catalog and title data into a static in Cloud Script, but there's no guarantee it'll be there from call to call, since your scripts could be running on a different V8 engine. Individual user data can't be cached in Cloud Script, since many different users will use the same engine.
Redeem Coupon 'GrantedItems' list empty, even though items were granted 1 Answer
can get cloud script to work with update user data 0 Answers
Item provides not happening even after using Playfab payment API 0 Answers
Google play icon missing in players tab 1 Answer
Temporary storage issue, please retry request. Service Unavailable 503 2 Answers