Retrieving Assets
Retrieving assets from a catalogue​
csharp
async void RetrieveAssets(){Catalogue[] catalogues = await session.GetCatalogues();if (catalogues == null || catalogues.Length == 0)Debug.LogError("Couldn't get organization's catalogues");// Most of the times, you will only have a single catalogueCatalogue myCatalogue = catalogues[0];// Get an list of outfits, filtered by gender and stylePaginated<Outfit> outfits = await session.GetAssets<Outfit>(catalogue: myCatalogue.Id,type: AssetType.outfits,style: Style.phr,gender: Gender.male);// GarmentsPaginated<Garment> garments = await session.GetAssets<Garment>(catalogue: myCatalogue.Id,type: AssetType.garments,style: Style.phr,gender: Gender.male);// HairsPaginated<Hair> hairs = await session.GetAssets<Hair>(catalogue: myCatalogue.Id,type: AssetType.hairs,style: Style.phr,gender: Gender.male);// ...}
csharp
async void RetrieveAssets(){Catalogue[] catalogues = await session.GetCatalogues();if (catalogues == null || catalogues.Length == 0)Debug.LogError("Couldn't get organization's catalogues");// Most of the times, you will only have a single catalogueCatalogue myCatalogue = catalogues[0];// Get an list of outfits, filtered by gender and stylePaginated<Outfit> outfits = await session.GetAssets<Outfit>(catalogue: myCatalogue.Id,type: AssetType.outfits,style: Style.phr,gender: Gender.male);// GarmentsPaginated<Garment> garments = await session.GetAssets<Garment>(catalogue: myCatalogue.Id,type: AssetType.garments,style: Style.phr,gender: Gender.male);// HairsPaginated<Hair> hairs = await session.GetAssets<Hair>(catalogue: myCatalogue.Id,type: AssetType.hairs,style: Style.phr,gender: Gender.male);// ...}