Blueprint is virtual class which can’t exist during compile time, so you can’t make C++ class being child to Blueprint, all you can do is make Blueprint a child of C++ class. So place all C++ code you need for blueprint in parent of blueprint.
But you could make custom C++ component that extend features of blueprint actor
I have a Player Character set up in Blueprint. Can I extend this Character through C++? If so, how?
Here is what I did to extend a character in C++ (to expose hidden functionality to my blueprint):
In UE4 editor:
- File (menu)->Add Code to Project.
- Leave Character selected and click Next.
- Give your new character class a name and click on Create Class.
- Visual Studio 2013 will be launched to open the new class.
- Edit the h and cpp files as needed.
- Then go back to your character blueprint in UE4 and choose File (menu)->Reparent Blueprint.
The step that took me a long time to figure out was the Reparent Blueprint. I have also done this with the PlayerConroller class.
Hope this helps!