How to set materials specific id

Hello,

I have a single mesh which have multiple materials id. how to set assaign a single material id?

here in code
item.render.meshInstances.forEach(function(instance){
instance.material = variantMaterials[activeMaterialIndex].resource;
instance.material.update();
});

Hi @rehman97,

You should be assigning it to each mesh instance as you are already doing, your code is correct. And no need to call .update() afterwards.