Search Unity

Bug Changing animation options in FBX prevents new animations from creating motions on subsequent import

Discussion in 'Animation' started by jeremysmitherman, May 11, 2023.

  1. jeremysmitherman

    jeremysmitherman

    Joined:
    May 28, 2017
    Posts:
    6
    I don't know quite how to reproduce this yet, but occasionally when working with a blender file and exporting it to FBX, all the NLA tracks/Actions import into Unity fine. Then something happens (this is the unknown part as of yet), and no matter what I do no new motions are made available for the mesh.

    The only solution I've found so far is to delete the FBX file entirely from Unity and then re-export from Blender and all new animations are present. This is an awful workaround though, especially if you've made changes to the FBX at all in unity for a prefab or something.
     
  2. jeremysmitherman

    jeremysmitherman

    Joined:
    May 28, 2017
    Posts:
    6
    Ok I've figured it out. If you edit the animation from the imported object it breaks for subsequent imports. How I've reproduced reliably:
    1. Create a blend file with an animation on the NLA track
    2. Export the FBX
    3. In unity, expand the FBX file and select the animation and selected "Edit" near the top right of the inspector. Change "Loop Time" to true and "LoopPose" to true
    4. In blender, add a new animation, push down to NLA track, and export FBX
    5. Notice new animation is not present as a motion in Unity
     
  3. jeremysmitherman

    jeremysmitherman

    Joined:
    May 28, 2017
    Posts:
    6
    Hm, it must be noted that this is not always consistent, sometimes the animations do properly import again.

    Well another workaround I've found when it *does* happen is to remove all clips in the "Animation" tab of the FBX in the inspector (This will automatically uncheck "Import Animations"), Apply, then check "Import Animations" again and apply and all animation motions, including new ones that refused to show up before, have returned. You'll still need to reapply any new settings to your clips again, but this is better than having to delete the entire FBX and starting over.