Overlap not triggered

Allright I just get rid of the other logic and focus on overlaps on your code and test it. Please make sure that you have appropiate header declerations on your functions on overlap so it gets triggered. Like putting UFunction to Overlap. That is the culprit I suspect.

Let us know if thats the case.

Apple.h

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Components/BoxComponent.h"
#include "Apple.generated.h"

UCLASS()
class SYSTEMCOLORSDEMO_API AApple : public AActor
{
	GENERATED_BODY()

public:
	// Sets default values for this actor's properties
	AApple();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

	UFUNCTION()
	void OnOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp,
	               int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);

public:
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Mesh, meta = (AllowPrivateAccess = "true"))
	UBoxComponent* BoxComponent;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Mesh, meta = (AllowPrivateAccess = "true"))
	UStaticMeshComponent* MeshComponent;
	
};

apple.cpp

// Fill out your copyright notice in the Description page of Project Settings.


#include "Apple.h"

AApple::AApple()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	Tags.Add("Apple");

	BoxComponent = CreateDefaultSubobject<UBoxComponent>(TEXT("BoxComp"));
	BoxComponent->InitBoxExtent(FVector(50));
	BoxComponent->SetCollisionProfileName("OverlapAll");
	BoxComponent->SetGenerateOverlapEvents(true);
	RootComponent = BoxComponent;
	
	MeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMesh"));
	MeshComponent->SetCollisionProfileName("NoCollision");
	MeshComponent->SetupAttachment(BoxComponent);
}

// Called when the game starts or when spawned
void AApple::BeginPlay()
{
	Super::BeginPlay();

	if (BoxComponent)
	{
		GEngine->AddOnScreenDebugMessage(-1, 60, FColor::Cyan, "Add");

		BoxComponent->OnComponentBeginOverlap.AddDynamic(this, &AApple::OnOverlap);
	}
}

void AApple::OnOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
{
	GEngine->AddOnScreenDebugMessage(-1, 60, FColor::Cyan, "Overlap");
	
}

void AApple::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
}

Cause without it basically Unable to bind delegate to ‘OnOverlap’ (function might not be marked as a UFUNCTION or object may be pending kill)

123