Log in or register to post comments

Adding a VIrtual Button to open a URL

June 22, 2017 - 12:24am #1

Hi! 

I'm basically a newbie with Unity. 

I've successfully implemented the basic AR app. Now I would like to add a virtual button to my model that, upon click, would open a URL on the phone's browser (Android, iOS). I tried using unity's add button and adding the Application.OpenURL script but the button is always active. I would like it to appear only when the image is recognized. 

Can anyone help me with this? 

Adding a VIrtual Button to open a URL

June 23, 2017 - 9:34am #3

Hello caesargaius,

This page describes how to setup and use Virtual Buttons in Vuforia: https://library.vuforia.com/articles/Solution/How-To-Implement-Virtual-Buttons

You can also download the sample project to test out a sample of Virtual Buttons if you want a more direct reference.

Thanks.

Adding a VIrtual Button to open a URL

June 23, 2017 - 3:44am #2

Hi,

In your "TrackableEventHandler.cs" find method OnTrackingFound() and add yourButton.setActive(true), next in OnTrackingLost() add yourButton.setActive(false)

Log in or register to post comments