How to get more info about blueprint created components from the CDO

I was basing a lot of code from the function in Unreal Tournament 4 that spawns all of the components for an Inventory Pickup.

They work with SCS Nodes in the class default object, in what looks like a really cumbersome way to iterate through the components and children of that component.

To get the parent of a blueprint component, they check the SCS node’s ParentComponentOrVariableName. However, this is NULL for blueprint components that are parented to other blueprint components. This results in Unreal Tournament not spawning children of blueprint created components, and it results in my code having the same problem.

I don’t even know where to begin looking for how Actors are spawned and know how to attach all the components correctly. The best I could do is find StaticConstructObject. There seems to be some random “magic” going on with reflection where it knows how to spawn the UObject from there.