question

Nguyen Trung Lam avatar image
Nguyen Trung Lam asked

How to get Catalog item custom data when login ?

I want to get the catalog item custom data when the player logs in. What parameters can I pass to InfoRequestParameters to do this, and will this data be cached on the client or refreshed each time the player logs in?

Title Datadata
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

·
Citrus Yan avatar image
Citrus Yan answered

You want to get the custom data for a specific item in the catalog upon login, is that right? In that case, you’d need an additional call to do this, which is the GetCatalogItems API call, it’ll return all the items in the specified catalog version with all defined properties (custom data included). And, the PlayFab SDK doesn’t automatically cache this data for, you’d need to cache it manually.

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.

Nguyen Trung Lam avatar image Nguyen Trung Lam commented ·

Thank you, Is there any way to know what version of the current primary catalog ? or the catalog hashcode so I can detect changes and drop outdated versions of the cache.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Nguyen Trung Lam commented ·

One way to do this is by storing the version string in Title data every time the primary catalog changes, and set InfoRequestParameters - GetTitleData as true so that every time a player logs in, it can get the current catalog version.

1 Like 1 ·

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.