How to Reorder Materials on Mesh? (Sort Elements by Material in Blender not working)

So I’ve been trying to import these models into unity but the order of materials is not the order of the materials in blender. I know that they are sorted by the amount of faces that use them but how can i actually override this and reorder them. I saw someone say you gotta go into blender and reorder the elements by material but that didn’t work, where can i go from here?

I just had the same problem and fixed it by reordering materials
so unity will swap the main material and put the materials in the order you want

in the materials add you main matierial first
then your second material
110678-capture.jpg
In edit mode, select all vertices Press W
Select “Sort Mesh Elements”
Sort by >Material

Hope it helps somebody else :slight_smile:

I used to be able to do what NatCou writes, but it appears Unity has changed something (also hinted by conorpo2):

Reordering Mesh Elements apparently no longer makes Unity change anything. And Unity remembers what materials where used in for example Slot 3, even if the model is saved with 3, then 2, then 3 slots again.

So a guess is that someone at Unity “Fixed” it, so once a model is imported, and once Materials are set, Unity remembers what is where, so he would no longer risk materials swapping around…

I can see the argument for that, if someone is not using Blender that has all these tricks up it’s sleeve, but some crap 3D program that randomly changes material slot order as you work…

Sometimes it happens because the object has unapplied modificators.
Apply all modificators and it works! )