Hey every time I build and run the editor it crashes because of this line
CollisionComp = PCIP.CreateDefaultSubobject<USphereComponent>(this, TEXT("SphereComp"));
CollisionComp->InitSphereRadius(15.0f);
//// this line right below
CollisionComp->OnComponentBeginOverlap.AddDynamic(this, &AEnemyClass::OnOverlap);
RootComponent = CollisionComp;
I did set it up in the header. Any idea what is going on? All I want to do is check the begin of the overlap.
void OnOverlap(AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex);
Thank you