Material instance is not reflected as a subclass of the reflected base material

It is pretty self explanatory, is it not? Material Instances aren’t new Materials, they are just instances of their parent Material. As such, instances should reflect as subclasses of their parent material class, not just :material.

ie.
M_Prop_PARENT - parent material
MI_Prop_01, MI_Prop_02, etc… - material instances of M_Prop_PARENT applied to various meshes

UpdateMyProperty(InMaterial:material, NewValue:float):void=
   if(CastMat:=M_Prop_PARENT[InMaterial]):
      set CastMat.MyProperty = NewValue

This will only work for M_Prop_PARENT and none of its instances, even though they are all the same material.

Working with MIDs in UE is easier, as there are a couple of functions to set param values by name.

1 Like