- Home /
Animation only runs in prefab and scene, but not during runtime.
Yeah thats pretty much it, i tried to google it but since i don't know whats wrong, i don't know what to google for.
Basically as the title states, the animation runs smoothly in preview of the scene and in the prefab editing mode, but not during runtime. Here's whats happening in my unity, maybe theres a box i checked and didn't realize.
https://www.youtube.com/watch?v=IZ6u2xicMWE&feature=youtu.be
Hope someone can help and thanks in advance.
Answer by xxmariofer · Jan 29, 2019 at 09:20 PM
you can test changing animator component for animation component and click the play on awake, if there is only 1 animationclip, or you can play using the animatior in the awake function.
Switching animator to animation component didn't fix the problem, but it gave an error in the console saying "Cannot find main animation clip" or something along those lines. Don't know how this happened but i deleted all the animation components and and .anim files and redid them from scratch. That fixed the problem this time, but for more complicated animations this maybe won't be an option, id really love to know what the problem was, but thanks for your help anyway :)
Your answer
Follow this Question
Related Questions
Mecanim issue: Twitching when blending into blendtrees 1 Answer
Animation Event Bug 1 Answer
Animation constantly resetting? 0 Answers
Animator won't let me add transitions 1 Answer
Weird animation bug 0 Answers