- Home /
[Solved] Applying multiple materials to a generated mesh object
I am going to be loading a mesh from a file, but I have no idea how to distinguish which triangles should be which material. Once it's on a GameObject, with a MeshRenderer, I just need to add another material to the materials list, but that's not my problem
Comment
Answer by Spykill · Oct 15, 2014 at 09:42 PM
I found out how to do this. You must set the subMeshCount in mesh, then use SetTriangles to assign to each submesh, where each submesh is a different material