I have written a function in my .h file
UFUNCTION()
void TriggerEnter(class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool FromSweep, const FHitResult& SweepResult);
and I have attached it to the component
Rock->OnComponentBeginOverlap.AddDynamic(this, &ACollisionActor::TriggerEnter);
All I want is to show a short text
void ACollisionActor::TriggerEnter(class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool FromSweep, const FHitResult& SweepResult)
{
Debug(“TriggerEnter”);
}
but no matter how I hit this object, I just can’t see the text
I think it may be the problem of setting of the object, so I set it like this
but it is still no working
can anyone offer some help, please