Atmospheric Fog doesn't work when added as component in C++

If I add an Atmospheric Fog component to an Actor in C++, it doesn’t work - it’s there in the hierarchy, but doesn’t have any effect on the scene. Here’s how I’m adding it:


Actor.h

UPROPERTY(BlueprintReadWrite, EditAnywhere)
        UAtmosphericFogComponent* AtmosphericFog;

------

Actor.cpp

AtmosphericFog = CreateDefaultSubobject<UAtmosphericFogComponent>("AtmosphericFog");
    AtmosphericFog->SetupAttachment(Root);
    AtmosphericFog->SetMobility(EComponentMobility::Movable);

But if I create a BP version of this actor, and add an Atmospheric Fog component to the hierarchy at the Blueprint level, it works fine.

What’s going on here?