How to get list of blueprint child components at compile time in editor?

Working in a custom C++ component, I’m trying to pull a list of child components when PostEditChangeProperty() is called (when a change is made to the component in the editor). However with my current setup, it always returns 0 child components, even when I know this to be false and have manually added child components myself.

Here is the incorrect code I currently have:

void UPickupObjectComponent::PostEditChangeProperty(FPropertyChangedEvent & e)
{
	Super::PostEditChangeProperty(e);
	TArray<USceneComponent*> Meshes;
	GetChildrenComponents(false, Meshes);
	if (Meshes.Num() > 0) {
		UE_LOG(LogTemp, Warning, TEXT("Found %d static meshes"), Meshes.Num());
		for (int i = 0; i < Meshes.Num(); i++) {
			if (Meshes[i]->IsA(UStaticMeshComponent::StaticClass())) {
				ChildMesh = Cast<UStaticMeshComponent>(Meshes[i]);
			}
		}
	}
}

If I try to call GetChildrenComponents in the blueprint construction script it works. Is there a different function I need to call in c++ to get it to work in editor?

Here is the function you need. It will fire for each attached component at compile

PickupObjectComponent.h

virtual void OnChildAttached(USceneComponent* childComponent) override;

PickupObjectComponent.cpp

void UPickupObjectComponent::OnChildAttached(USceneComponent* ChildComponent)
{
    Super::OnChildAttached(ChildComponent);
    //Your code here
}

Thanks very much, I went for a different solution in the end but this will be useful in the future.