CursorOver in C++ isn't working

I’m trying to implement like that the outline of Actor is highlighting and at the same time mouse cursor is also changed, when mouse cursor is overlapping on the actor.

I write my codes like below. I can see mouse cursor, when I play. And the settings like “bShowMouseCurosr” or “bEnableMouseOverEvents” are working well. But When the cursor is overlapping over this Actor, nothing is happened and the shape of mouse cursor isn’t also changed as crosshairs at the start of play.

Could somebody give me advise, what I’m missing or did wrong?

I set Player Controller Class up as this below PlayerController class and Default Pawn class is just DefaultPawn on World Settings.

PlayerController h

#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "MousePlayerController.generated.h"

/**
 * 
 */
UCLASS()
class REALPORTFOLIO_API AMousePlayerController : public APlayerController
{
	GENERATED_BODY()

public:
	// Sets default values for this actor's properties
	AMousePlayerController();
	
protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;
};

PlayerController cpp

#include "MousePlayerController.h"

AMousePlayerController::AMousePlayerController()
{
	// 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;

}

void AMousePlayerController::BeginPlay()
{
	Super::BeginPlay();
	DefaultMouseCursor = EMouseCursor::Crosshairs;
	bShowMouseCursor = true;
	bEnableClickEvents = true;
	bEnableMouseOverEvents = true;
	DefaultClickTraceChannel = ECollisionChannel::ECC_Visibility;
}

actor h

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

#include "WorldMapTile.generated.h"

UCLASS()
class REALPORTFOLIO_API AWorldMapTile : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	AWorldMapTile();

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

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

private:
	UPROPERTY(EditAnywhere, Category="Overlap")
	UStaticMeshComponent* SM_WorldMapTile;

	UPROPERTY(EditAnywhere, Category="Overlap")
	USceneComponent* DefaultSceneRoot;

	UPROPERTY(EditAnywhere, Category="Overlap")
	UBoxComponent* BT_WorldMapTile;

	UFUNCTION()
	void CursorOverlapBegin(UPrimitiveComponent* Component);

	UFUNCTION()
	void CursorOverlapEnd(UPrimitiveComponent* Component);

private:
	bool bOverlapping = false;
};

actor cpp

#include "WorldMapTile.h"
#include "Components/BoxComponent.h"

// Sets default values
AWorldMapTile::AWorldMapTile()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = false;
	DefaultSceneRoot = CreateDefaultSubobject<USceneComponent>(FName("DefaultSceneRoot"));
	SetRootComponent(DefaultSceneRoot);
	SM_WorldMapTile = CreateDefaultSubobject<UStaticMeshComponent>(FName("StaticMesh"));
	SM_WorldMapTile->SetupAttachment(DefaultSceneRoot);
	BT_WorldMapTile = CreateDefaultSubobject<UBoxComponent>(FName("BoxTrigger"));
	BT_WorldMapTile->SetBoxExtent(FVector(100.0f, 100.0f, 25.0f));
	BT_WorldMapTile->SetupAttachment(DefaultSceneRoot);
	BT_WorldMapTile->SetRelativeLocation(FVector(0.0f, 0.0f, 0.0f));
}

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

	BT_WorldMapTile->OnBeginCursorOver.AddDynamic(this, &AWorldMapTile::CursorOverlapBegin);
	BT_WorldMapTile->OnEndCursorOver.AddDynamic(this, &AWorldMapTile::CursorOverlapEnd);
	BT_WorldMapTile->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
}

// Called every frame
void AWorldMapTile::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);


}

void AWorldMapTile::CursorOverlapBegin(UPrimitiveComponent* Component)
{
	UE_LOG(LogTemp, Display, TEXT("Cursor is overlapping"));
}

void AWorldMapTile::CursorOverlapEnd(UPrimitiveComponent* Component)
{
	UE_LOG(LogTemp, Display, TEXT("Cursor is NOT overlapping"));
}

Hey thanks for your help!

I could change the mouse cursor with the CurrentMouseCursor. I did set DefaultMouseCursor as Crosshairs, and then assign it to CurrentMouseCorsor.

And for the OnBegin- and OnEndCursorOver, I had to set at the Collision Settings “Collision Presets” of the component, that I wanna call OnBegin- and OnEndCursorOver, as “BlockAllDynamic”.