Box Collision in Actor



//Some init function (BeginPlay for example)
{
    YourBoxPtr->OnComponentBeginOverlap.AddUniqueDynamic(this, &AYourClass::OnYourBoxBeginOverlap);
    YourBoxPtr->OnComponentEndOverlap.AddUniqueDynamic(this, &AYourClass::OnYourBoxEndOverlap);
}

// declaration in header
UFUNCTION() void AYourClass::OnYourBoxBeginOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
UFUNCTION() void AYourClass::OnYourBoxEndOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex);