How do you get a custom mesh to self shadow and cast shadow?

Finally figured it out.
Turns out it was the CalcBounds function.
It was setup like so

FBoxSphereBounds UGeneratedMeshComponent::CalcBounds(const FTransform & LocalToWorld) const
{
	FBoxSphereBounds NewBounds;
	NewBounds.Origin = FVector::ZeroVector;
	NewBounds.BoxExtent = FVector(HALF_WORLD_MAX,HALF_WORLD_MAX,HALF_WORLD_MAX);
	NewBounds.SphereRadius = FMath::Sqrt(3.0f * FMath::Square(HALF_WORLD_MAX));
	return NewBounds;
}

That turns out to be a very large bounding box and my guess is the shadow rendering code ignores it as if it’s not in the shadow render pass.

To fix it I changed it to represent a more accurate bounding box based on the actual geometry.