1
votes

This appears to be such a common problem, that finding answer to my specific case is near impossible, because of the amount of noise in google or forum searches.

I have imported object to unity from blender. This objects had smaller objects inside it. Those smaller objects have animation on them, which was created in unity. If I open the animation window (Window->Animation) and press play - I can see correct movement of an object. Animation is set to play automatically in inspector, culling type is always animate. If I play the game however, animation does not play. Why?

3

3 Answers

0
votes

I Could not find any unity inspector based answer. For now, the best option I have is to create new script, and in update() check if the animation is playing. If not, play it. Very inefficient, so to whoever might stumble upon this post in the future, I suggest you try to add this.animation.play() in setting up part of the script.

0
votes

I know it's kinda late, but this is for others having this same issue.

Animations in Unity have types (2 of which I know). Type 1 can be attached to an object using the Animation Component. Type 2 can only be used in Animators (Mechanim).

Animations imported with FBX files are type 2 (and as far as I know, animation type in FBX files can NOT be changed), so they will usually not work when attached directly to an object with "Animation". They should be used with Animators and Animator Controllers. Just create a New Controller and add the animation. It will become the default animation state and play automatically.

If you want it to loop, click on the FBX asset, and in the Animation tab, choose Loop Time and click Apply.

0
votes

add the animation to the main object, then animate the smaller object...

you have to put animation component to main object, then animate the small part...

it is important...

it should work