Having an issue with AddDynamic. Here’s the code.
UFUNCTION in header file
UFUNCTION()
void OnActorOverlap(class UPrimitiveComponent* OverlappingComp, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
In the .cpp
tBox = CreateDefaultSubobject<UBoxComponent>(TEXT("Root"));
tBox->bGenerateOverlapEvents = true;
//tBox->OnComponentBeginOverlap.__Internal_AddDynamic(this, &AmyActor::OnOverlap, OnOverlap);
tBox->OnComponentBeginOverlap.AddDynamic(this, &AmyActor::OnActorOverlap);
Attached is the following error within visual studio
I get
Error: No instance of function template “FComponentBeginOverlapSignature::__Internal_AddDynamic” matches the argument list argument types are (ClassName , void (ClassName::)(UPrimitiveComponent *OverlappingComp, AActor *OtherActor), FName)
object type is: FComponentBeginOverlapSignature
I’m rather new to C++ & Unreal, thanks for looking over and any recommended books would be greatly appreciated