InstancedStaticMesh material is not showing up

I decided to use InstancedStaticMeshComponent for my game. However, I cannot get the material for it to show up. The StaticMeshes that I have them use all have materials set up to them and when I drag those in as a simple static mesh the material shows up. However, when I addInstance() to my Instanced static meshes the meshes will appear without any material. Any ideas why this might happen?

In case anyone else is having this problem:

There is a flag inside materials called something like usedWithInstancedStaticMeshes. If you set that to true it will work.

Thank you for pointing this out. :smiley:

WHY IS THIS EVEN A THING IN THE ENGINE. and yes it worked ty