Executing function (ivia code) after Animation is finished playing?

Hi,

I was wondering if someone has been able to do this via code?
I know that it’s possible to, for instance, add an event to an animation and call a function that way, but I’m finding that that is not always as reliable. It causes some weird behaviour and basically I find it cleaner to call a new function in code.

What I want to do, in the bowlingmaster game in this case, is after the swipe animation is finished, then I want to reset the ball.

Maybe this already covered in a later lecture. But I did some searching on the Unity docs(https://docs.unity3d.com/ScriptReference/Animation.IsPlaying.html) and the Animation class has a isplaying property however I’m unable to access it.

I’ll explain, it specifically is called Animation and when I publicly expose this so I can drag an Animation to it it doesn’t work. If you expose an Animation you can’t drag an animator, an animator controller or an animation clip to it. In a way that makes sense, but if none of those three is an Animation, then what IS an animation that I can use for this?

An Animator or an Animation clip do not have IsPlaying or other properties available. Googling around what I’m seeing is to use an animation event.

Anyone encountered this, or have a solution for this?

Regards,