In C++, UE4 override the BP function DestroyActor, so i can’t destroy AIController in BP.
void AController::K2_DestroyActor()
{
// do nothing, disallow destroying controller from Blueprints
}
After referring to GameModeBase.cpp, I find out that GetWorld()->DestroyActor
or AActor::Destroy
(AActor::Destroy calls the GetWorld()->DestroyActor) can destroy Controller.
So, which api should I use to destroy AIController without side-effect?