public void SetItemDetails(string prodName) { itemName = prodName; ProductDetail.SetDetailValues(prodName); productName.text = ProductDetail.name.ToString(); prodPrice.text = ProductDetail.price.ToString(); quantityAmount.text = CartState.cartItems[prodName].ToString(); }
void Start() { if (Image != null && Image.Name.ToString().Contains("1Vid_")) { _videoPlayer = videoPlane.GetComponent <VideoPlayer>(); _videoPlayer.loopPointReached += OnStop; } if (Image != null && Image.Name.ToString().Contains("Prod_")) { ProductDetail.SetDetailValues(Image.Name.ToString()); productTitle.text = ProductDetail.name; productPrice.text = ProductDetail.price; ProductSceneCart.SetCartItem(Image.Name.ToString()); } if (Image != null && Image.Name.ToString().Contains("Cat_")) { ProductDetail.SetDetailValues(Image.Name.ToString()); catalogTitle.text = ProductDetail.name; catalogPrice.text = ProductDetail.price; CatalogSceneCart.SetCartItem(Image.Name.ToString()); } }