Can an abstract class automatically add methods in blueprint
I'm trying to create an abstract AActor classe(called ADisturbance) that could then be use has the parent class in my blueprints (for exemple BP_FireDisturbance). In ADisturbance, I want to have an abstract "StartDisturbance()" method. That method would then automatically appear in BP_FireDisturbance. Is that actually doable?
asked Mar 12 '19 at 04:36 PM in C++ Programming
Absolutely, it's totally doable. (Perhaps depending a bit on what you mean exactly by "automatically appear in [blueprint]")
Are you familiar with Blueprint Native Events? If not, have a look at this UE4 wiki page for starters: Blueprints, Empower Your Entire Team With BlueprintNativeEvents
These allow you to define functions with default behavior in C++, which then allow you to override that behavior in derived Blueprints.
I know the 'event' part of the name can be confusing, but try not to let that deter you; they can be used just like regular ol' virtual functions.
If you want your default function behavior to do nothing, with all the functionality being implemented in the derived blueprints, that's easy to do: just don't add any behavior to the definition in your .cpp file.
If you still have questions after looking over that wiki page (and other resources, if needed), I'll do my best to help.
answered Mar 12 '19 at 05:54 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here