Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Not All Animations from Blender Import into Unity

Discussion in 'Asset Importing & Exporting' 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:
    382
    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.
     
  4. alti

    alti

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

    RickshawDerpyDerp

    Joined:
    Nov 6, 2018
    Posts:
    23
    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.
     
  6. tiru_g007

    tiru_g007

    Joined:
    Jan 17, 2020
    Posts:
    2
    sorry for necroposting... but found something that could fix this.

    Export the file with a different name (re-importing won't work), the new animations will be present in the new file, but not in the old one... it looks like a bug to me. Select those animations and hit ctrl+D
     
    M_R_M, akuno and salvim800 like this.
  7. terids

    terids

    Joined:
    Sep 23, 2017
    Posts:
    16
    THANK YOU. I've been on this for a few hours now. Bug with the importer.
     
    M_R_M likes this.
  8. awkner

    awkner

    Joined:
    Oct 15, 2012
    Posts:
    2
    Wait, ctrl+D and then what? How do I add the new animation clips to the other file in Unity?
     
    marian42 likes this.
  9. atiq_qazi

    atiq_qazi

    Joined:
    Dec 2, 2020
    Posts:
    3
    Just delete meta file
     
    CoolCoder3000 likes this.
  10. salvim800

    salvim800

    Joined:
    Apr 12, 2021
    Posts:
    1
    thanks it worked
     
    akuno likes this.