Showing controls based on types

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
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.34.25