From the course: AR Development Techniques 01: Basic Concepts

Unlock the full course today

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

Scripting

Scripting

From the course: AR Development Techniques 01: Basic Concepts

Start my 1-month free trial

Scripting

- [Instructor] In this video, we are going to write some code to play an animation when a button is clicked. In the previous video, we added an animation component to all the three box models, and we created an animation clip for them. Now we want to play that animation for all the three boxes. The animation component has several methods, one of which is play method, which is used to play the animation. We are going to write a code script in which we will get the reference to this animation component and then call the play method when a button is clicked. You'll understand this much better when we actually do it. We are going to code in C#, which is the language using Unity. C# is an object oriented language, which is similar to C++ and Java. We are not going to write any complex code, so you'll be fine if you just know the basics of coding, and if you just follow along. And I'll also explain the code along the way,…

Contents