question

mateandor avatar image
mateandor asked

unity catalog version use

Hello guys!

I try to use catalogs in unity. The catalogs like shoes, shirts, etc with items.

My question is: how i can get catalog items from a specific catalog like shoes.

I use:

layFabClientAPI.GetCatalogItems(new GetCatalogItemsRequest(), result => {
            Catalog = result.Catalog;


             foreach (var item in Catalog)
             {
                 //builder.AddProduct(item.ItemId, ProductType.Consumable);
                 Debug.Log("Catalog: " + item.DisplayName);
             }


             // Make UnityIAP initialize
         }, error => Debug.LogError(error.GenerateErrorReport()));

How i can get just shoe catalog items?

thanks

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

The way the catalog system works, all the items for your game should be in the catalog (hence, the reason it's "CatalogVersion" and not "CatalogId"). When you query the catalog itself, you get all the items in it, and you can use any filtering you like at the client/server level to check on a subset of items. We'll be providing more options for filtering in the call to get the catalog in a future update, but one thing you could do right now is to make stores within your catalog. Stores are the way to set up a subset of items from the catalog in a set, so that you can have a distinct "shoe store", "shirt store", etc. You can also then override which store a player is retrieving and using based upon what segments they're in.

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.

mateandor avatar image mateandor commented ·

Thanks for the fast answer!

Can you help me, how I can create a store?

0 Likes 0 ·
brendan avatar image brendan mateandor commented ·

The basics on store setup are here: https://api.playfab.com/docs/tutorials/landing-commerce/stores. But I'd also recommend checking out the info on using segmentation to vary the stores players retrieve and use: https://api.playfab.com/docs/tutorials/landing-analytics/ab-store.

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.