Graph is linked to private object(s) in an external package

I have exactly the same problem as over here, except that the solution does not work for me. Wondering if it’s because my children aren’t pointers…

I have this struct:

USTRUCT()
struct FChild {
	UShapeComponent* bounds;
}

And, in the parent class:

UPROPERTY()
TArray<FChild> Children;

I am creating FChild instances like this:

void AParent::Init() {
	uint8_t index = Children.Add(FChild());
	Children[index].Init(this);
}

void FChild::Init(AParent* parent) {
	bounds = NewObject<UBoxComponent>(parent, "Bounds");
}

As can be seen, I’m passing the parent as the Outer when calling NewObject, but I still get the “Graph is linked to private object(s) in an external package” error when I try to save. How do I fix this?

Found the reason: It was because I was calling Init() in the constructor of the parent. When I moved it out to PostActorCreated() instead, it worked fine.