Is this black magic happening with custom trigger volume when modifying c++?

So my problem is I have a class AirBurstTriggerVolume that inherit from TriggerVolume. I set up the BeginOverlap, EndOverlap and everything work. But here come some black magic curse. As soon as I modify the code, like previously I added the Tick function (and put it to true for parent ), all AirBurst I have placed previously on my level will be cursed and act weirdly.

First Case: It will work normally. Second Case: Only overlap detection will work. Third Case: Nothing work.

But in BeginPlay, they all print the message. Also, if I place a new one, the new one will work just fine until I modify the code which then curse it.

I have tried searching doc, info, google etc. Created a new class from scratch. I have cleaned the solution, removed the folder, did a hard reset of both, recompiled from source etc etc. Testing it on a french UE install doesn’t fix it either. I am out of idea atm.

What I am expecting is for each actor placed in the level to update correctly when the code is updated and recompiled. I don’t want to have to replace each and everyone of the actor I placed in my level one by one.

Hopefully someone here got some white magic to counter this curse.

Alright so I made a new project to do the minimal reproducible example:

MyTriggerVolume.h

#pragma once

#include "CoreMinimal.h"
#include "Engine/TriggerVolume.h"
#include "MyTriggerVolume.generated.h"

UCLASS()
class AIRBURSTTEST_API AMyTriggerVolume : public ATriggerVolume
{
    GENERATED_BODY()
public:
    AMyTriggerVolume();
    UPROPERTY(EditAnywhere)
    FVector vectorToAdd;
    bool PlayerIsOverlapping;
    int TickCounter;

    UFUNCTION()
    void OnOverlapBegin(class AActor* OverlappedActor, class AActor* otherActor);
    UFUNCTION()
    void OnOverlapEnd(class AActor* OverlappedActor, class AActor* otherActor);

    virtual void BeginPlay() override;
    virtual void Tick(float DeltaSeconds) override;
};

MyTriggerVolume.cpp

#include "MyTriggerVolume.h"
#include "DrawDebugHelpers.h"
#include "AirBurstTest/AirBurstTestCharacter.h"

AMyTriggerVolume::AMyTriggerVolume()
{
    PrimaryActorTick.bCanEverTick = true;
}
void AMyTriggerVolume::BeginPlay()
{
    Super::BeginPlay();
    OnActorBeginOverlap.AddDynamic(this, &AMyTriggerVolume::OnOverlapBegin);
    OnActorEndOverlap.AddDynamic(this, &AMyTriggerVolume::OnOverlapEnd);
    DrawDebugBox(GetWorld(), GetActorLocation(), Brush->Bounds.BoxExtent, FColor::Orange, true, -1, 0, 5);
    TickCounter = 0;
}

void AMyTriggerVolume::Tick(float DeltaSeconds)
{
    Super::Tick(DeltaSeconds);
    TickCounter++;
    if(TickCounter % 10 == 0)
    {
        TickCounter = 0;
        if(PlayerIsOverlapping)
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, TEXT("Ticking while overlapping"));
        }
        else
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Orange, TEXT("Ticking while not overlapping"));
        }
    }
    
}
void AMyTriggerVolume::OnOverlapBegin(AActor* OverlappedActor, AActor* otherActor)
{
    if (otherActor && (otherActor != this))
    {
        GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, TEXT("Entering OverlapBegin"));
        checkf(Cast<AAirBurstTestCharacter>(otherActor), TEXT("Cant cast into player from OverlapBegin"));
        if (Cast<AAirBurstTestCharacter>(otherActor)) {
            PlayerIsOverlapping = true;
        }
    }
    if(PlayerIsOverlapping)
        GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, TEXT("Overlap Begin"));
}

void AMyTriggerVolume::OnOverlapEnd(AActor* OverlappedActor, AActor* otherActor)
{
    
    if (otherActor && (otherActor != this))
    {
        GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, TEXT("Ending overlaping"));
        checkf(Cast<AAirBurstTestCharacter>(otherActor), TEXT("Cant cast into player from OverlapEnd"));
        if (Cast<AAirBurstTestCharacter>(otherActor)) {
            PlayerIsOverlapping = false;
        }
    }
    if(!PlayerIsOverlapping)
        GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, TEXT("Overlap End"));
}

To reproduce the bug, place a my trigger box in the level. it should work. Now just move the two delegate from BeginPlay to the constructor. The one you placed shouldnt not work anymore. If you place a new MyTriggerBox in the level, the new one should work.

If you remove the function Tick, all placed MyTriggerVolume shouldnt work even for their Overlap detection but their begin play should still work.

Rebuilding from Unreal may or may not make the old one work again and may or may not break the recent one.