June 2017
Beginner to intermediate
336 pages
8h 44m
English
Remove product unloads the holograms from the scene. When you do an Air Tap on the Close icon, it removes the associated products.
The following code block finds the Close Game Object from the Toolbar control and attaches an ProductRemover script as a component with the Game Object. Once the component is added, pass the current launchedObject as parameter to the ProductRemover Class.
GameObject removeProduct = toolBar.transform.FindChild("Close").gameObject;ProductRemover remover = removeProduct.AddComponent<ProductRemover>();remover.toberemovedObject = launchedObject;
You need add the ProductRemover.cs file inside the Scripts folder. The class must inherit from the InputClickHandler Interface and implement the OnInputClicked() ...
Read now
Unlock full access