- Home /
Sharing animations with models
Can someone point me to a code example that will apply a common animation to a model in Unity?
I have several character biped models from 3DS Max that all share the exact same animations (walk, talk, run etc.)
Rather than export each model with all their animations it seems to me that I can save a lot of space by exporting only the model and each animation once and apply the animation at run time.
Thanks for your time!
I am working on a school project and I need a teenager boy model with walk or run animation. Can you share them with me, plz?
Answer by Lucas Meijer 1 · Nov 08, 2009 at 04:14 PM
If you have dude.fbx, try calling your animations dude@walk.fbx, dude@talk.fbx, etc.
Unity will automatically recognize this convention, and add the animationclip's from those fbx's to the Animation component of the imported dude.fbx. Alternatively, you can use Animation.AddClip() to add any AnimationClip to an Animation component.
var walkClip : AnimationClip;
animation.AddClip(walkClip, "walk");
Thanks Lucas. Does Unity recognize it is the same mesh and not duplicate the mesh data when building the player?
Answer by Brian-Kehrer · Nov 21, 2009 at 03:01 AM
For the specific case of building asset bundles out of the animations, we export the skinned mesh, and then delete the mesh in maya when exporting the various animations.
If you don't trust Unity, or want to do an A-B comparison, or want to make asset bundles, this is an option.
Your answer
Follow this Question
Related Questions
How can I creat a moduler character model with soft skin weights? 0 Answers
How i can setup Character 0 Answers
How to animate inside Unity? (Blender animation is finished) 1 Answer
character model squeezes in moving platform. 2 Answers
How do people make an efficient FPS animation/modelling system? 0 Answers