I cannot figure out how to add a UMaterialInstanceDynamic to a UProceduralMeshComponent.
The function UProceduralMeshComponent::SetMaterial() expects a UMaterialInterface for its input, but I tried casting my MID like this:
But it doesn’t work, the Procedural Mesh ends up without a material. And yet, in Blueprint, you can very easily add a Material Instance Dynamic to a Procedural Mesh.
What am I doing wrong?