This all works fine. I have OnActorEndOverlap added to an ActorEndOverlap method in an identical way. However, it isn’t writing the debug statement, so I am assuming that the ActorEndOverlap method is never being called, and I don’t know why.
I copied and pasted your code to my project on version 4.9 and it worked as expected. There was a compilation error using your code. The UFUNCTIONs had to read like this to compile for me:
In my constructor I generate my collision root primitive and the the root component to it:
MySphereColl = CreateDefaultSubobject<USphereComponent>(TEXT("MySphereColl"));
MySphereColl->SetCollisionProfileName(TEXT("BlockAll"));
MySphereColl->SetCollisionEnabled(ECollisionEnabled::PhysicsOnly);
MySphereColl->InitSphereRadius(35.0f);
MySphereColl->bGenerateOverlapEvents = true;
// Set the SphereComponent as the root component.
RootComponent = MySphereColl;
The object I had my actor collide with was a static mesh actor with collision set to “BlockAll” and “Generate Overlap Events” on.
It wouldn’t work in 4.9, because I’m on 4.12 and the API appears to have changed; the documentation is yet to catch up. Providing one AActor in the method signature doesn’t work. To answer your previous question, the presets are set to Pawn for the character, Vehicle for the vehicle. The collision presets are fine as it calls the BeginOverlap. It’s just for some reason not calling EndOverlap.