From the course: AR Development Techniques 02: Lighting and Physics

Unlock the full course today

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

Creating a 3D UI: Part 2

Creating a 3D UI: Part 2

From the course: AR Development Techniques 02: Lighting and Physics

Start my 1-month free trial

Creating a 3D UI: Part 2

- [Instructor] In this video, we are going to write some code to change the car body color when any of these buttons are pressed, and also we'll link the 3D UI to our toggle button so that we can enable or disable the 3D UI whenever we want. So let's create a script for our 3D UI. Let's go to Scripts folder, and I'll create a new script. Right-click, Create, C# Script, and I'll name this, UIController3D. To add the script to our scene, I'll create an empty gameobject. So right-click, Create Empty, and I'll name this UIController3D, and I'll drop the script right here. Now, open the script. I'm going to create three functions for our three color buttons. So the first one will be public void RedColor, then public void WhiteColor, and then public void BlueColor. The RedColor function is for the red button, the WhiteColor function is for the white button, and the BlueColor function is for the blue button. So when the…

Contents