I got some strange behaviour in 4.16. I setup a new blank c++ project and implemented everything there from scratch to be a 3rd person template (just to learn what changed etc.).
Now I got everything working, but I encounter a strange error. When I compile the editor in development mode, it triggers the following breakpoint:
ScriptDelegates.h, Line 509:
(void)ensure( InvocationList[ CurFunctionIndex ] != InDelegate );
This is raised by the following function call in my characters BeginPlay method:
void AMyCharacter::BeginPlay()
{
Super::BeginPlay();
// Subscribe to overlap events
InteractionSphere->OnComponentBeginOverlap.AddDynamic(this, &AMyCharacter::OnInteractionOverlapBegin);
// THE END OVERLAP DELEGATE SEEMS TO BE ALREADY BOUND TO THAT EXACT METHOD HERE
InteractionSphere->OnComponentEndOverlap.AddDynamic(this, &AMyCharacter::OnInteractionOverlapEnd);
}
So, it looks like the call of AddDynamic on OverlapBegin seems to automatically connect the OverlapEnd method, is this correct? And even if this is correct, I find this behaviour extremely untransparent. I tried to comment out the AddDynamic call for the EndOverlap delegate and it really is bound (gets executed when I hit play, and the breakpoint from above is not triggered).
Why is this happening? My character also has a blueprint class, but it does not bind any events on the sphere component.
So, is this a bug or some new “feature”?