I have three objects (meshes) in blender, each with the same three materials.
They have the same order in blender, but in Unity the materials in the mesh renderer are in random order. This is bad if i want to change one of the materials, because then different parts of the meshes get the new material.
In the Image you can see excerpts from the mesh renderer og each mesh, the materials for the meshes in blender and what happens if i assign a Material to element 0, 1 and 2 of all objects simultaniously (Left from blender and right in Unity in similar colours) ( i know that thats not supposed to work, given the different orders)
How do i ensure, that all the objects retain the order of the materials from Blender?
I import the .blend file to unity.
It’s been a long time since I had this problem myself, but iirc Unity orders the materials based on vertex order.
To fix this in blender, select all your vertices in edit mode, and hit Mesh > Sort Elements > Material.
I wish this worked for me … Blender 2.9 … in the end I noticed that the FBX materials are sorted by alphabet… so I fixed the material ordering by using numbers
This worked for me!, the sorting thingy didn’t working at all but this fixed the issue, thank you very much! Note: I was using Blender 3.6 and Unity 2023.1.13f1