In a C++ class I am creating a component inside of the empty constructor. In the BeginPlay method im accessing the component but the component is a nullptr. I’ve set a breakpoint inside of the constructor and noticed that it’s not being called, but the BeginPlay method clearly is. Wonder why the empty constructor is not being called.
Note that the c++ class is a parent class of a blueprint and this might point to a potential reason. I guess a different (implicit?) constructor must be getting called instead.
Solution: I modified the constructor to take an ObjectInitializer and now the constructor is being called. Then I reparented the blueprint (to a character blueprint) and reparented a second time back to my c++ class (deriving from character).