Download

why should a c++ "BlueprintImplementEvent” function in an interface use enum param directly?

I’ve metioned this wiered error during compiling an interface:



class  IINTERFACE_ANIM_BP_CREATURE_BASE
{
    GENERATED_BODY()

public:
    UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
    void Set_Strong_Control_Type(some_enum Val);
};

This passed compile, while


    UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
    void Set_Strong_Control_Type(TEnumAsByte<some_enum> Val);

can’t pass and throws a ‘No overrided member function found’ error.

I’m just curious about the error. Any idea guys?~ :slight_smile:

EnumAsByte, namespaced enums, are legacy engine architecture.

Why exactly they cause an error there I don’t know, never tried that.
btw should be passed something like
TEnumAsByte<some_enum::Type> there.

Thx for reply~ I’ll try it later on :slight_smile:

Nope it’s not working. I think it’s better just use enum then~