Error: CDO Constructor: Failed to find Material

Hello, I’m trying to load a material instance from a blueprint:

static ConstructorHelpers::FObjectFinder<UMaterial> MIArea(TEXT("MaterialInstanceConstant'/Game/Materials/Decals/MI_area.MI_area'"));
if (MIArea.Object != NULL)
	UMaterial* TheMaterial = (UMaterial*)MIArea.Object;
	UMaterialInstanceDynamic* TheMaterial_Dyn = UMaterialInstanceDynamic::Create(TheMaterial, this);
	AttackAreaMesh->SetMaterial(0, TheMaterial_Dyn);

But I’m getting as a result: Error: CDO Constructor: Failed to find MaterialInstanceConstant’/Game/Materials/Decals/MI_area.MI_area


I right clicked the Material Instance in the Editor, then clicked “Copy Reference”, and pasted like in the code above.
The blueprint is in the right path.

What could be the problem?


My bad, I had UMaterial instead of UMaterialInstance for the type.