On certain static meshes in my game, when they are initialized, I create and set material instance constants for each of the materials on the mesh (so i can apply damage params to the materials via UnrealScript).
simulated function PreBeginPlay()
{
for (i=0; i<Mesh.GetNumElements(); i++) {
Mesh.CreateAndSetMaterialInstanceConstant(i);
}
...
}
The trouble I’m having, is that this also sets these materials on the each of the lods for this mesh. This can be highly undesirable as the lod may be using different materials altogether.
Does anyone know how to get around this problem? Thanks in advance.