I have a custom actor class in C++ and a blueprint which uses this custom class as a parent.
In the blueprint I added a skeletal mesh component, and in my C++ class I set the root to a custom scene component. Thus my structure is
CustomRoot | -----> SkeletalMeshComponent
However, when debugging the C++ class, the Skeletal Mesh Component does not appear in the Owned Components of the Actor, is not a child of the root and can’t be found by
FindComponentByClass<USkeletalMeshComponent>() (since both methods iterate over the owned components).
Why is that and how can I get the Skeletal Mesh Component inside my C++ class (preferably without creating it as a member in the C++ class)?