Order of multi-material meshes imported from Modo?

So in modo you make a mesh, you attach two materials to that mesh.

You export to FBX, import to Unity. Then it makes a Renderer with two material slots, with your materials in it. Is there anyway to control the order that those two materials get placed in the materials list?

I haven’t tested this but I believe it’ll use the same order you have in the Render list in modo, however, I have no idea whether it goes from top to bottom or the other way around.

Aaaaand 3 years later… The order of materials when imported in Unity, is in the order you created/assigned them in Modo. Render list order in modo has no effect on the array order when importing to Unity. If you remove an existing material in modo, e.g. the one at index 0, the array will update properly and the material that was previously on index 1 will become index 0. If you add a new material (different name from the one you had just deleted) it will be added to the end of the array. HOWEVER, if you create a new material and use the SAME NAME as the one previously deleted, it will magically occupy the same index as it used before for this name(in this example 0). I think if you SAVE the modo scene after deleting, it will lose the previous index, maybe due to refreshing of the MTL data. We have discovered that if you export the MTL file, you can edit it’s (textual) contents, re-arrange the order of how it was saved and it will use that order in unity. But that feels tedious.

This hasn’t been thoroughly tested, but is what we have concluded when fiddling with the issue.

I’m thinking of a solution. What I will do is check the asset file first, read the shared materials array, map the names and indices (a generic dictionary should suffice) and when applying materials to an instance of the asset, i lookup in the dictionary and apply accordingly. Luckily, we use only 2 materials with very specific names: skin and item so, I’m kinda hoping this will work.

One could automatically create a private dictionary on a scriptableObject file as soon as the model asset is drag-and-dropped as a reference, so you don’t have to read the info at runtime.

EDIT:
My 3d artist told me the following: Vertices and polygons are saved in an array in modo. Apparently the order of materials is tied to the index of any (or all or lowest value) polygon in the mesh. So, if you want to push a material down the array, cut and paste the polygons under this material. You should be able to cut and paste stuff around to get the desired order. Hope this helps.