In C++ I have a UProperty that is a TArray<UPrimitiveComponent *>.
I want to be able to create components in the component editor and then add references to those components in the defaults editor.
The components I’ve created don’t show up as options when I try to add array elements. It instead lets me create a new component on the fly there. Weird thing is in code, the element in the array is there but the pointer is still NULL.
Construction scripts aren’t really an option for me since I’m working with the CDO (Class Default Object) and the construction script never gets called. I’m only using these actors as templates and metadata for how to spawn things in a random level generator.
(I just thought of an alternative idea)
I can populate my array by creating a dummy component and all its children will be added to the array. I’d still like to know how to do the thing I mention above if possible.
(Well parenting to a specific component didn’t work since the component AttachParent was NULL for some reason)
Using a component tag works though.