**Context: **
- In C++ you can easily change the class hierarchy before you recompile each time.
- There is no reason, to me, why this shouldn’t be possible for Blueprints (the BP properties change while the editor is running anyway)
Problem:
- Let’s say I have a Blueprint called BP_Gun. I’ve previously added BP_UsableActor, which it derives from, with inherited properties.
- Having implemented an arrow shoot function, I want to generalize a property called IsAmmoManualLoad, but I don’t want this on BP_Gun.
2b) However I also want to retain any BP_Gun properties for a BP_Bow. - I’ve added other child-Blueprints of BP_Gun, spending time on this, but willing to use a slow recompile method.
- I want to re-structure the entire Blueprint hierarchy (early prototyping phase) to have BP_Bow inherit from a separate BP_Weapon in-between.
5a) The parenting structure of BPs would change from:
BP_Revolver -> BP_Gun -> BP_UsableActor
BP_Bow -> BP_Gun -> BP_UsableActor
BP_Shotgun -> BP_Gun -> BP_UsableActor
5b) To:
BP_Revolver -> BP_Gun -> BP_Weapon -> BP_UsableActor
BP_Bow -> BP_Gun -> BP_Weapon -> BP_UsableActor
BP_Shotgun -> BP_Gun -> BP_Weapon -> BP_UsableActor
Proposed solution:
- Add code to enable reparenting BPs in the editor, with the caveat of a full recompile of that BP’s children BPs (slow).
- The UI implementation can be a combo box/dropdown where the BP parent is currently shown.
Devil’s Advocate and other considerations:
- I could just use tags, but this is restricted to the level’s actors themselves, not dynamically generated actors i.e. not (BPs) at the static level.
- I could add extra data in C++, but 1) I want the flexibility and 2) for more complex examples I will still need this solution anyway.