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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Imported Blender Files do not include Blender Links

Discussion in 'Editor & General Support' started by KeeganTawa, Dec 29, 2021.

  1. KeeganTawa

    KeeganTawa

    Joined:
    Jan 18, 2019
    Posts:
    9
    Hey everyone - I've got a blender file with a series of links to other blender files. When importing to Unity, none of these linked files show up in the import. In the hierarchy of the imported .blend file, I can see the linked blender files, but cannot see them in the actual rendering or game. Any help is appreciated! Thanks -

    Keegan
     
  2. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    6,016
    Are you taking the approach of leaving the .blend file in your assets folders and letting Unity handle the import? Or are you exporting an .fbx the old fashioned way? If you haven't tried the second, I'd give that a shot and see if that brings along all the linked files.
     
  3. KeeganTawa

    KeeganTawa

    Joined:
    Jan 18, 2019
    Posts:
    9
    Hey Spiney, thanks for that suggestion. It doesn't seem like this should work, because from what I've read, Unity does that .fbx conversion internally when you reference the .blend file. Nonetheless, this does work, I'm not sure why. But all of the blender links come through intact. Thanks for the suggestion!
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,971
    The reason why it works has nothing to do with Unity.

    To see what I mean, load up your Blender file that contains links to other files.

    Now export that file as FBX.

    Now open the FBX in your favorite editor, or in Unity.

    Note how the FBX now has fresh copies (NOT LINKS!) of the linked objects.

    So just beware that this "baking" of the linked objects occurs at import time, which with Unity, is a bit blurry: when Unity imports a .blend file, the first thing it does is tell Blender to EXPORT the .blend file to FBX, then Unity imports the FBX.

    To see what I mean, do the import and then go change the linked file geometry internally.

    Note: the imported .blend that links to this file does not change.

    Now reimport the .blend file with links and note that the changes in the linked file are now "baked" into the new import.

    Now reimport the FBX you hand-exported earlier. Note how nothing changes regards the changed sub-linked object, as the FBX has a copy, not a reference.

    Be careful.

    While we're at it, to demystify this whole process a bit more, here is some additional data:

    Unity imports Blender3D objects as FBX via a little Python script:

    https://forum.unity.com/threads/from-blender-to-unity-problem.1073381/#post-6925811

    The Python script that Unity uses (substitute your Unity version number or search) to import:

    ./Hub/Editor/2020.2.1f1/Unity.app/Contents/Tools/Unity-BlenderToFBX.py


    More on fixing it:

    https://forum.unity.com/threads/all-my-mesh-folder-content-is-gone.1102144/#post-7094962

    Blender3D objects used as trees / detail in Unity3D terrain (See the second half of this response)

    https://forum.unity.com/threads/ter...trees-made-with-blender.1112119/#post-7155631

    https://forum.unity.com/threads/all...nging-parent-in-blender.1159283/#post-7442123