From the course: AR Development Techniques 03: Recognition and Tracking

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

AR glasses try-on, part 4

AR glasses try-on, part 4

From the course: AR Development Techniques 03: Recognition and Tracking

Start my 1-month free trial

AR glasses try-on, part 4

- [Tutor] Let's write some codes to enable and disable the glasses settings to change the color of the glasses and to activate the buy now and cancel button. So let's create a new script. Right-click create C sharp script. I name this UI controller and I'll create a UI controller object in the hierarchy and add the script right here. Open the script. Now to enable and disable the settings box, we will create two functions. One to show this box when any one of these buttons are clicked, and the other function to hide or disable this box when the cancel button is clicked. So I'll create public void G1infoboxenable and G1, which is glasses one infoboxdisable. Let's copy this for other two glasses as well. And this will be G2 and this will be G2 as well. This one is G three and G three. Now to enable or disable these objects, we need to have their reference inside the script. So let's create public variables, public game…

Contents