Swap 3D model with a button

Hello everybody! At first, sorry for my bad english. I’m working with unity 5.3.5 and Vuforia 5.5. Unfortunately i’m not able to write script then i’m in trouble!! I’m building an AR app for Android and i want to swap the 3d model with another 3d model when i press a GUI button. i’ve read
in all forums but nothing work fine… someone can help me?

Hi! If I understood you correctly, the easiest way would be:

Create/Load both objects at the start of the program and deactivate one of them. Then create a button for each of your objects.

Select your button. In the inspector, under the section “On Click()” click the little “+” sign at the bottom. Drag your first object into the “Object” Slot. In the “Function”-drop down, select GameObject/SetActive(Bool). A little checkbox appears; leave it empty. Do the same thing again (click plus, drag the second object into the object-slot; select “GameObject/SetActive(Bool)” and this time, activate the checkbox.

This way, when you click the button, Object A gets deactivated and Object B gets activated.
However, this will only work “one way”, so you will need one button per possible object. If you want to toggle/switch between the objects multiple times using one button, you will have to write a little script. If you need help with that, don’t hesitate to ask.

I hope this helped you a bit - good luck!

I solved my problem!I modified this script(https://www.ourtechart.com/augmented-reality/tutorial/augmented-reality-user-interface-unity3d/) adding features. This is the modified script:[73292-script.txt|73292]