instantiate prefab with virtual Button

366 views Asked by At

I want to create a Domino vurforia Sampel in Unity3d. To this end, I want to create a Prefab with domino and a Virtual button. This should fall with the real finger. With a mouse click I want to create the Prefab with instanciate. But my Virtual Button has no function after the produce. What am I doing wrong or it is not possible at all?

1

There are 1 answers

0
Augmented Jacob On

Your domino effect tutorial is openly available as a Unity Sample download on their site You could simply open that scene and look up the scripts they've used and any other detail you wish for.

What you're claiming is that your virtual button does not act like a virtual button. In this case please re-download the Unity Extension again for Vuforia as there might have been an error while importing them on your end.

That being said, these buttons will not work unless you know how to code them. You can refer to this answer for the same on how to code your virtual button and how to make it function.

In your question you said you want to dynamically load a button. While there is a way to do it using the code given in the above link, I would simply suggest you use vb.SetActive(false) in your Start() and on Update() with a particular condition being satisfied you could use vb.SetActive(true) to make it function from then on.

I hope this helps you.