Currently we can create Blueprints using subclass of C++ class, but what if,
we have C++ class hierarchy: ANpc : AActor, ASuperNpc : ANpc.
Then we would like to create NpcBP : subclass ANpc, in which we will create and arrange Components for Npc,
then we need to create SuperNpcBP : subclass ASuperNpc, in which we want already to have NpcBP components/variables, and we want just replace Small Head Component with Big Head Component. But currently SuperNpcBP has only ASuperNpc subclass without NpcBP subclass.
So, what i suggest:
When you create Blueprint, you could inherit it by 3 methods:
- Blueprint : only base C++ class. (when you create SuperNpcBP in editor, you specify only ASuperNpc C++ class)
- Blueprint : base C++ class and base BP class. (when you create SuperNpcBP in editor, you specify ASuperNpc C++ class, then ue4 detects base class of ASuperNpc (it is ANpc : AActor) and if it is not directly AActor/UObject and also Blueprintable, then editor suggests you to specify also NpcBP blueprint class, which has to be inherited from ANpc C++ class).
- Blueprint : only base BP class. (when you create SuperNpcBP in editor, you specify only NpcBP blueprint class)
Currently, you can do only (1) and (3), but not (2).
PS: i know, thats crazy idea, but anyway. I am also not sure is it good idea or bad.
Currently i could create ANpc C++ class, and then create NpcBP : ANpc, and then create SuperNpcBP : NpcBP, but in such case i am not able to add SuperNpc specific C++ code.
Currently i could create ANpc C++ class, and then ASuperNpc : ANpc, and then create SuperNpcBP : ASuperNpc, but in such case i am not able to have base blueprint NpcBP, which could contain reusable component structure and variables for derived blueprints, so i have to implement base NpcBP specific blueprint code from scratch for every new Npc type. Currently i am using this method, but if it would be possible to inherit Bluerpints from both C++ and Blueprint classes, simultanously, then i would have ability to create BaseBlueprintClasses along with BaseCPPClasses, and reuse BaseBlueprints, instead of implementing them from scratch for every new blueprint type.