You should be able to simply save over the file in your Unity project folder. It will detect that the FBX has been changed and trigger a re-import of the file. As long as the edits you made did not include removing animations, you should be fine. After everything gets re-imported, you can explore the animation tab on the model’s settings and do anything you need with the new animations (i.e. name clips, add events, add curves, etc).
Your animation controller will be unaffected by this as it is not tied directly to the model file.
Thanks. Does this work for Generic as well? I tried it before, but my animation controller had “none” for all of the animations.
I think I may have deleted and copied directly within Unity. I guess I should be doing it outside of Unity, such as using WIndows Explorer to overwrite the file?
It will work with Generic as well as Humanoid. The biggest worry when you are dealing with rigged meshes is changes to your skeletal rig and weights. As long as you are just adding new animations all should go well.
If you delete a file from the Project Window in Unity, you will lose animation links and that is why all the motion fields in the controller said “none”. In Unity there are meta files for everything that contain some configuration data used by the importer. Removing a file also removes the meta file that couples to it. As you said, just overwrite the file in Windows explorer. This keeps the meta file intact and allows Unity to properly handle it as an existing asset. As long as you don’t delete an animation you are using, all should go well.
For my game Horde Rush, I actually wrote Postprocessor code to automatically reassign the animation clips to the controller’s states, as long as the name of the animation stayed the same as when I originally authored the controller.
5 years later and im stumbing across this. Any chance youd wanna share this code lol? Would find it SUPER useful for some of the updating work ive been doing with characters
I can dig for it again, but even after doing this, I struggled with Mechanim state changes, due to timing and event issues. I moved on to Animancer. I know it can be a bit pricey, but it’s worth every dollar I paid for it. The Lite version is a good trial if you ever consider it. I’ll see if I can dig up any code snippets tonight (PST).
EDIT:
Here’s the gist of it:
Keep in mind it’s 5 years old, and Unity’s API may have changed since then. Also note I was having a bunch of other problems too, like applying the loop state.
I got to a point that I was fed up with trying to figure out how to control Mechanim the way I wanted. Animancer basically is what I wanted to begin with.
Thanks! I have a ton of bootleg scripts that do things like reverse animations, batch import them (since you cant select multiple to change root motion options), transfer skinned meshes, etc. im sure i can work with this!