How to correctly initialize Decal Components and Materials in C++?

I have following code:
.h

UDecalComponent * SelectionMarkerDecal;
UMaterial * SelectionMaterial;
UMaterialInstance * MaterialInstance;

.cpp

static ConstructorHelpers::FObjectFinder<UMaterial>MaterialInstanceObj(TEXT("Material'/Game/TopDown/Materials/Decal_CurrentMarker.Decal_CurrentMarker'"));
    if (MaterialInstanceObj.Succeeded())
    {
        SelectionMaterial = MaterialInstanceObj.Object;
        MaterialInstance = UMaterialInstanceDynamic::Create(SelectionMaterial, this);
    }

    SelectionMarkerDecal = CreateDefaultSubobject<UDecalComponent>(TEXT("Selection Decal"));
    SelectionMarkerDecal->AttachTo(RootComponent);
    static ConstructorHelpers::FObjectFinder<UDecalComponent>SelectMarkerObj(TEXT("Texture2D'/Game/TopDown/Textures/Marker_Current.Marker_Current'"));
    if (SelectMarkerObj.Succeeded())
    {
        SelectionMarkerDecal->SetDecalMaterial(MaterialInstance);
    }

But my decal is always NULL. What is the proper way to initilize Decals?
Docs are not very helpful, when it comes to c++.

Thank you.

This was quite a long time ago, but if you’re still wondering what you’re missing, you forgot to RegisterComponent on UDecalComponent.

been rackin my head on this as well. When I had it working changing an input on one placed instance would change them all.

So finaly what worked was overloading OnConstruct() in the actor. Always create the mid there. and hold a reference to it with a UPROPERTY() tag in your actor.