virtual Interface function
Error: .../DamageableInterface.h(21) : BlueprintImplementableEvents in Interfaces must not be declared 'virtual'
It's NOT a BlueprintImplementableEvent... It's a BlueprintNativeEvent, I assume that this is a minor UE4-bug. But sadly according to the internal code even if it would work correctly, it would still throw an error for BlueprintNativeEvents:
So basically, virtual methods are no longer allowed for blueprint interfaces but they are allowed for C++ ones?
I also found this: https://forums.unrealengine.com/showthread.php?4089-Are-there-plans-to-add-the-ability-to-override-virtual-functions-in-Blueprint where it is said that by default "all interface functions are virtual by default". This however is not true because when I put this in my character-class (header):
It will tell me that it can not find a function to override... If I remove the override it will work. I'm a bit confused..
That is because that function will be generated by UHT and will contain code calling blueprint event, otherwise calling this function in C++ would not call out event in blueprint, this is scar that BlueprintNativeEvent do. No worries all you need to do is create function with _Implementation surfix, like this:
It will be called when event is triggered
Follow this question
Once you sign in you will be able to subscribe for any updates here