How do I call a c++ native event from blueprint

I have created and compiled a custom actor with a native event. I can add the event to my blueprint graph but I am unable to actually fire the event. Obviously this is not the real code from my project but I built a super simple example project just to try and isolate my problem.

/* MyActor.h *.
UCLASS()
class AMyActor : public AActor
{
	GENERATED_UCLASS_BODY()

	UFUNCTION(BlueprintNativeEvent)
    void Foo ();
    
    UFUNCTION(BlueprintNativeEvent)
    void FooOneParam (float MyFloat);
};

/* MyActor.cpp */
AMyActor::AMyActor(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{
}
void AMyActor::Foo_Implementation()
{
    if (GEngine)
    {
        GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, FString(TEXT("Foo")));
    }
}
void AMyActor::FooOneParam_Implementation(float MyFloat)
{
    if (GEngine)
    {
        GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, FString::SanitizeFloat(MyFloat));
    }
}

How do I actually fire the foo event? I tried adding calling it from my class blueprint and I also tried from the level event. I can call other custom event on this same blueprint but there is no node in the list that I can use to call blueprint native events.

You can call Foo from code and that will trigger a blueprint definition of the Foo event (or the native Foo_Implementation if the blueprint doesn’t define one).

If you are asking how you can trigger the Foo event from a blueprint, you need to add the [BlueprintCallable][1] function specifier (and a [Category][2] specifier as well). Once that’s added you can call it like below.

9476-fooevent.png

Thanks.

The BlueprintCallable specifier was the part I was missing.