I don’t think it’s possible to spawn and attach a component inside another component’s constructor since neither of them has an owning actor at that point. See here for an explanation. Instead, I would suggest creating the two components in the constructor of the owning actor, setting one of them as root, and attaching the other to it, like this:
But make sure that your parent component is inheriting from USceneComponent, not UActorComponent (so that you can use this ptr as the target for attach.
You might also have to explicitly call RegisterAllComponents on the actor to see the attachment in-editor.
This was the solution that ended up working for me. It didn’t like the child component being attached at the same time the parent component was being constructed.
Moving the attachment to OnComponentCreated solved my issue.