Modify material instance for individual instanced meshes

If you were to set up one of these in your materials. then i think you could scan it with the below line and find the texture you are after.

GetParameterDesc(name ParameterName, out String OutDesc);

MaterialInstanceConstant(FoliageActors.InstancedStaticMeshComponents[j].Materials[i].GetParameterDesc(name ParameterName, out String OutDesc);

Just give each texture a same ParameterName name. but a different OutDesc and then you should be able to identify the ones you need and do what your after.

1 Like