ATestActor::ATestActor()
{
PrimaryActorTick.bCanEverTick = true;
fogComponent = CreateDefaultSubobject(TEXT(“Fog”));
fogComponent->bEnableVolumetricFog = true;
}
void ATestActor::BeginPlay()
{
Super::BeginPlay();
fogComponent->VolumetricFogAlbedo = FogColor;
}