Meshes that are linked instances in Blender loose material when importet to Unity

Hi, i have a interesting problem that i cant imagine noone stumbled upon until now… so i think i might do sth wrong.
I have a big Scene in Blender which houses a lot of Instanced Meshes. After i import it to Unity all instances exept the original Object lose there Material and have it replaced with the URP Lit Shader. The Mesh Instances work fine… just the material unlinkes.
Dupilcates work fine… but I dont want to make the instances to individual Meshes as this seems like a bad fix.
Also i kind of dont want to reassign all the materials… since there are a looot of those.

Any tips? and am i realy the first one who stumbles upon this? :eyes:
Is this just a qirk in the FBX import export?


(example fine attatched)
Best

9173312–1277201–Test.zip (102 KB)

I find it better to make lots of small Blender files, then combine them into prefabs within Unity.

You will not be able to do 100% of any workflow in Blender in any case.

“Something” will ALWAYS need to be done in Unity.

Since anything done on the Blender side has to “survive” the import process, see near the bottom below for my usual approach, which seems to result in the lowest friction.

This might help you reason about what you are seeing:

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

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:

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

Probuilder and Probuilderize and Blender:

Some more potentially-useful info:

Updating Blender files without breaking your prefabs:

When I work in Blender3D for Unity3D use, I follow these organizational rules:

  • use Empty Blender Objects as folders: they come out as an extra GameObject

  • ALWAYS parent everything to a single Empty, even a single object

  • put as few objects in a given .blend file as possible, combining them in Unity into a prefab

  • set good names for your Blender3D objects and NEVER RENAME them after Unity sees them

  • don’t even think about Materials or Textures in Blender, just do it in Unity

Its a problem with the new FBX exporter of Blender 3.6 it works fine with 3.3
and this post sais in 3.5 (havent testet this though)

Im using a older Unity 21.3.24 … so this might just be an incompatibility.

Import Export its a bit of a tricky one indeed… Thanks for the super helpfull collection of information sources!!
Best

This was an issue in the FBX exporter in the initial release of Blender 3.6, but was fixed in 3.6.1: Fix #104737: FBX: Materials missing from linked duplicates · dab724afe2 - blender-addons - Blender Projects

awesome! thy for summing this up