We already discussed changing the toolbar button based on the type of product we select. We have three different buttons in the toolbar, and we want the Refresh button to be present only when user downloads a WallPaint.
Add the next set of code block just after the instantiating your toolbar.
if (launchedObject.name != "painting_a(Clone)")
{
toolBar.transform.FindChild("Referesh").
gameObject.SetActive(false);
}
With this preceding code added, the Refresh button will only be visible when we have a WallPaint downloaded, for other products we will have only two options: Close and Add to Cart.
WallPaint with additional Refresh Icon in the toolbar