From the course: ARKit and Unity: Build a Drivable Car in Augmented Reality

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Changing the color of the car

Changing the color of the car

- [Instructor] In this video I will show you how to add functionality to view this car in different colors. So I will add four different UI buttons for four different colors. That is, yellow, white, red and blue. So when we tap on each of these buttons the color of the car will change to that. So let's do it. Open Canvas and let's start creating the buttons. Right click. UI. Button. Let's give this a width of 50 and height of 50 as well. Let's delete the text. Now let's arrange this button in the Canvas. Also I think 40 width and 40 height is much better. I'll name this one as yellow. Duplicate this. Drag it here. And name this white. Duplicate again. This will be red. Duplicate again. And this will be blue. Let's center them. And let's give them colors so that we know which one is which. So this is yellow. This one is white. Then the red one. And this one is blue. Now we are going to create a script in which we'll write some code to change the color of the car when any of these…

Contents