How to export animation to Unity?

Hi all,
I have just finished an animation and I wish to export it to Unity. I know the workflow in Maya but not in Blender and I have not found any recent tutorials. How to do it?
I mean, I guess I will have to bake it, then export the armature, mesh and animation. But how to do these? (and the one if I might have forgotten)
Thanks in advance.

Just save the project when you have the keyframes in your animation fully done. Then in Unity Import a new Asset and choose the .blend file.

When you click the imported object in the folder structure you’ll have 3 tabs in the inspector, one of them will be Animations.

You can then cut the animations to your liking and control them with an animation controller. For a detailed guide on animations in Unity just watch thw animation controller documentation from Unity’s guide series.

Bake Action with Clear Constraints checked is your friend, though I haven’t done this for a while since I’ve been busy with Enlighten workflows.

Thanks for the help. As a matter of fact I did manage on my own, but not without issues :smiley: I spent 3 hours cleaning up an animation. The mesh was all twisted and distorted, unrecognizable, but now it’s fine.
Thanks again for your help!

Didn’t think it can be this easy to import from blender :smiley: and I was there messing around with all the fbx stuff.
Thanks, lads/lasses.

Hmm, I’m also trying to import my animations into Unity, and it seems to work better when I export to .fbx myself, rather than dropping the blend file into my assets. For some reason, when using the blend file, I only get 1 animation (called ‘Default Take’). When using the fbx file, I get them all (and even some doubles).

Not that everything works very smoothly/reliably, though. Today, for some reason, it decided to scale my object up 100 times. That didn’t happen yesterday, so I don’t know what’s going on. Quite frustrating, really.

Are you using the action editor and marking everything as fake user? If you do that rather than mess with the NLA editor, things should come out correctly.

As for the FBX scaling, Maya’s default units are cm, whereas Blender and Unity are meters. So sometimes, Unity will automatically scale up an FBX by 100 on import to compensate. You can fix that in the import settings. It is also possible to get Unity to use Blender’s binary FBX exporter rather than the ascii version when importing blend files directly. You just have to modify a couple of python scripts in Unity editor folder and in Blender’s fbx exporter folder.

Thank you all for your help. I managed fine by using the FBX tools. Took a bit of getting used to but so is life.