- Home /
Stop clips from an Animations array on an Animation component
Hello all of you !
First of all, I'm working with a project done for someone else. It has some gameobjects with Animation component, so in certain conditions i need to stop those animations. I tried to use myGameObject.Animation.Stop()
, but this freeze the object, and i don't want that (i need to play the "out" animation). So i'm trying to access to the clips on the Animations array in the Animation component of each object with the hope of stopping the actual animation and play the "out" animation.
In that way I've the code line Animation anim[actualAnimation].enable = false
I was hoping to stop the animation with that, but it doesn't. ¿Is there another way to do that?
Thanks in advance !
PD: Excuse me, maybe my english is not the best. I hope you understand what I mean.
Your answer
![](https://koobas.hobune.stream/wayback/20220613151403im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unassigned Reference Exception 4 Answers
Play specific animation in mechanim 1 Answer
Animated Texture Offset 1 Answer
adding animation dynamically by script 0 Answers
Playing an animation with C#? 1 Answer