How Do I Wait The Animation To Finish Before Running A Line Of Code

How do i wait the animation to finish before running a line of code

-Thanks Nicholas

Use an animation event at the end of the animation timeline.

How?

Open the animation and add an event at the end. If you don’t know how to do that Unity Connect.

I mean how do i make it so it waits untill its finished after that?

Make a function in your code with the same name as the event and put whatever you want to happen at the end of the animation in that function. When the event fires at the end of the animation your function will be called.