Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Not All Animations from Blender Import into Unity

Discussion in 'External Tools' started by VengeanceDesign, Jun 16, 2016.

  1. VengeanceDesign

    VengeanceDesign

    Joined:
    Sep 7, 2014
    Posts:
    84
    Hi everyone,

    I'm importing animations from blender to unity and most animations import but others don't. I found that when I have a action selected before exporting, that animation gets imported into Unity. So if I have my armature selected with the action for reloading the AK12 weapon, that animation gets exported but the reload animation for the other weapons don't. How do I make sure that all actions/animations are imported properly into Unity?

    Thanks in advance.
     
    RickshawDerpyDerp likes this.
  2. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    381
    Are you using any linked meshes, armatures or animation clips in your .blend file? ('Link' entry in Blender's 'File' menu).

    If so, it could be that your Actions have lost their association with their Armature and you maybe need to create a new .blend file, proxy the Armature again and append the linked Actions from your non-working .blend file.

    Otherwise, if you're neither linking stuff nor using proxies, you can try using the FBX exporter (used by Unity behind the scenes) directly from within Blender and watch the output window (pull down the menu bar with the mouse or run Blender from a command prompt).

    It should contain messages like these:
    If you see the third line from my example, there may be some association issue with your armature. The logic deciding which animations to export and which not to is contained in /opt/Blender-2.77a/2.77/scripts/addons/io_scene_fbx/export_fbx.py, line 2495 (insert correct Blender path and version, obviously), if you know some Python you can place more debug output there to find out why your actions are being skipped.
     
  3. VengeanceDesign

    VengeanceDesign

    Joined:
    Sep 7, 2014
    Posts:
    84
    I found the issue. I had clips with animation data for deleted constraints. Deleting the animation data for the deleted constraints solved the issue. Anyways, thanks.
     
    RickshawDerpyDerp likes this.
  4. alti

    alti

    Joined:
    Jan 8, 2014
    Posts:
    26
  5. RickshawDerpyDerp

    RickshawDerpyDerp

    Joined:
    Nov 6, 2018
    Posts:
    10
    I want to further recommend the solution that VengeanceDesign found. I use Blender 2.80 and had the problem of some extra actions being undeletable and others not importing into Unity.

    To delete an action completely in 2.80, you need to deactivate the shield icon (formerly 'F' symbol) and shift-click the **X** button to delete all instances simultaneously (good luck deleting them one-by-one; redundant actions are like groundhogs). If you RENAME **ANY** Shape key drivers, those drivers will do NOTHING inside Blender or anything else; You need to delete them and re-key them before export, or Unity (or whatever) will not find them. This is what I had to do.