Multiple animation clips from keyframing? + to Unity?

I’m quite new to both Unity (5.4) and making animations in Blender (2.77). I’ve made a Blender model, and animated it using keyframes. When I import that blend file into Unity, this animation comes along (as ‘Default Take’), and I can use it in the Unity scene. Hurray!

But I need multiple (keyframed; not using armatures/bones or anything) animations on my assets. So would it be possible in Blender to make/export those? And then hopefully be able use them in Unity later on? I’ve tried messing with NlaTracks in Blender, but nothing seems to work.

Thanks in advance for any suggestions!

Why must you not use bones?

I’m not sure why you wouldn’t be using bones unless you are doing something along the likes of fps weapon animations. Multiple mesh renderers are terribly inefficient for a single object, unless all the parts needed different shaders anyway.

As for the animations, in the dope sheet, you’ll notice that where it says “summary” is a drop down menu. Switch that to action editor, and make a new action for each animation. Mark each action with the “f” which allows the animations to export correctly. When you import into Unity, you’ll see all your different clips.

Thanks for your input, Dreaming, much appreciated.

I wasn’t using any bones because I was keyframing the transformations (LocRotScale) of my object. There was no apparent need for multiple mesh renders on a single object as far as I know, so I’m not sure what you mean by that – though I may need multiple shaders on various parts of my object in the future. I was just trying to keep the animations as simple as possible, eg rotating around some axes.

Anyway, I’ve discovered the action editor you’ve mentioned, and the ‘fake user’ thing. I kind of got it working, but there still are a lot of questions. I’ll possibly ask those later, though, because I’ll need to look into further optimising my workflow first. I can’t even really remember what exactly it was I did that made it work right now…

Blender:


Unity:


So in Unity I get 6 clips instead of the expected 2, and only 2 of those seem to actually do anything – provided I drop them onto the correct object in my scene. That feels like a quite a bit of overhead, so that will probably need some finetuning.

I also get a couple of NullReferenceExceptions in the console, in both SerializedPropertyBindings.gen.cs:74 and in AnimationClipEditor.cs:323 (both in C:/buildslave/unity/build/blahblah). This doesn’t appear to stop the animations from working, but it would be nice to know where this is coming from.

Will probably be continued – unless I just give up altogether, of course… :slight_smile:

Keep in mind that actions are not the same as strips. When exporting to Unity, ACTIONS are imported. Check the action editor, you’ve probably created extra unneeded actions by moving various parts of the scene while Auto key was on. Delete those by Shift + X’ing them, and delete those strips in the NLA editor as you don’t need them. Leave only the bones’ actions and then export.