Model textures are swapped on play! (SOLVED)

Hi everyone. I have a model that looks alright on editor but when run, textures look messed up.

On editor:

On game:

I am using the original model material from the Illumination asset:

Any help is appreciated

Ok, I was able to solve this issue. The problem was, I was using editor scripts to set the materials and textures to the model. Defold seems to apply textures using the order of them rather than using their names so textures were mixed up. Modified the script to respect the correct order on the mesh and solved the problem:

4 Likes

Unfortunately using names is not working. You should use texture0 to texture7

2 Likes