question

jrDev avatar image
jrDev asked

Container is Null?

Hello,

I am trying to get container from a CatalogItem but it returns null.

GetCatalogItemsRequest request = new GetCatalogItemsRequest(){
CatalogVersion = catalogVersionName
};

PlayFabClientAPI.GetCatalogItems(request, (result) => {

var catalog = result.Catalog.ToArray();

if(catalog[0].Container !=null){//THIS ALWAYS RETURNS NULL

}

Thanks,

jrDev

10 |1200

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

brendan avatar image
brendan answered

Sorry for the delay on this. Just so everyone is aware, Title IDs don't need to be treated as secret. Without having access to your Secret Key, no one can alter your configuration in any way, and when your title ships, the Title ID will be in all the messages between your client and our service, so it will be plainly visible.

If you do need to send us something private though, please be sure to use the devrel@playfab.com email address, so that the Developer Success team sees it and can act on it right away.

In this case, the catalog also contained an item which wasn't a container, and which was occupying that first slot in the array, hence the null return value. The recommendation when processing the catalog is to always iterate across all the items in it, in order to find and act upon the one(s) you need.

10 |1200

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

brendan avatar image
brendan answered

Can you let us know what the catalog is that you're attempting to read, and the Title ID?

10 |1200

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

jrDev avatar image
jrDev answered

Hey,

 

Sent a email in about this.

 

Thanks,

jrDev

10 |1200

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

jrDev avatar image
jrDev answered

Hey,

 

Thanks for the help!

jrDev

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.