Having an issue with importing a mesh from MayaLT 2020 to Unity 2019.4.9f1
In the project I’m working on there is a model that has been placed multiple times in multiple scenes. I made a lower poly version and saved over the original file in the Unity project in explorer. When I opened the project again it had properly overwritten the original except that in the scene the model seems to have the wrong material assignments. It is supposed to be using 5 different textures which all show up perfectly fine in the inspector preview of the model and when dragging out a new instance of the model they show up fine but the previously placed models all look like they are only using 1 or 2 materials.
Anyone else had this issue or know how I could fix this?
Figured this out.
Problem was the original model imported into Unity had materials slotted in a specific order and when exporting a new version of the model from Maya, they were not in the same order.
Fixed by following this answer on Maya forums:
"Sorry to jump a necro thread but this might help people who are looking at similar problems.
The indexing of materials on a mesh in maya is the order in which they are added to the mesh. If you are combining meshes together you can control the order in which you add them.
If you have an existing mesh you separate a mesh into pieces, each with a single material on it. You can then combine them in order to get the desired indexing.
In Unity using FBX import the material order (indexing) is based off the maya mesh. So you can control the index and swap materials using index numbers.
Guessing other engines would do it similar."