Greetings.
So I am trying to bind one of my functions to the OnActorBeginOverlap event. I am following a tutorial in a book. I am stuck at the binding part which is exactly like the following advice. The advice here (A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums) says all I need to do is:
Step 1: Declare It (in the header file)
UFUNCTION()
void OnOverlap(AActor* OtherActor)
Step 2: Define it
//Bleakwise.cpp …
void ABleakwise::OnOverlap(AActor* OtherActor) { … }
and finally Step 3: Bind it.
//Bleakwise.cpp …
OnActorBeginOverlap.AddDynamic(this, &ABleakwise::OnOverlap);
Unfortunately, this does not work. I get the error (in Visual Studio) that:
no instance of function template “FActorBeginOverlapSignature::__Internal_AddDynamic” matches the argument list.
argument types are: (ABleakwise , void (ABleakwise::)(AActor *OtherActor), FName)
object type is: FActorBeginOverlapSignature
I have seen other answers to this but they address components. Then, when I tried to add a third argument to the AddDynamic call, it says there are too many arguments. The internal add dynamic actual function is supposed to be creating a name for the method that is being binded. So why is it complaining that it did not receive a third item?
Any help would be great appreciated. Thanks so much. (Note: I am a noob to Unreal Engine and am working on version 4.12.5.)