public void SetCurrentProduct(Product product, ProductVariant variant, int quantity) { gameObject.SetActive(true); ProductTitle.text = product.title(); VariantTitle.gameObject.SetActive(variant.title() != "Default Title"); VariantTitle.text = variant.title(); Quantity.text = quantity.ToString(); Price.text = variant.price().ToString("C"); try { _imageSrc = variant.image().transformedSrc(); } catch (NullReferenceException) { var images = (List <Shopify.Unity.Image>)product.images(); _imageSrc = images[0].transformedSrc(); } _currentVariant = variant; }