I want to create my character logic (e.g. control, shooting, inventory etc) via C++ and add actors to my character via Blueprint. (I inherit blueprint from my character class.)
Example to explain what did I mean:
I have Camera attached to socket on my skeleton mesh’ head (first person view). Also I have Camera attached to spring (Third person view). I watch several tutorials and I think there is two ways:
- Add all components via blueprint editor. It is very useful to set position, rotation and sockets for my components. But this class is inherit, so I can’t access my cameras and other components from C++ base class.
- Create all components in C++ class constructor using
CreateDefaultSubobject
, position and attach they manually. It’s useful to access them from C++, but it’s a bit uncomfortable to set all positions, socket names etc in code, instead using GUI.
Is there any way to combine this two ways? Maybe some virtual methods to setup parameters (e.g. socket names) from Blueprint Editor?