Developer Notes

void AController::K2_DestroyActor()

{ // do nothing, disallow destroying controller from Blueprints }
Description

Destroying an AI Controller does not seem to remove it from the world. The controller will still remain in the World Outliner even after Destroy is called.

Attempting to get the AI Controller after it's been destroyed returns a null value, so it seems that it is getting destroyed, but the controller is still remaining in the World Outliner, which is unexpected.

Found in 4.15.1. Reproduced in 4.14.3 and 4.17 Dev Framework CL# 3397002

Steps to Reproduce
  1. Open the editor
  2. Create a new Pawn and AI Controller
  3. Assign the AI Controller to the Pawn
  4. On Begin Play, Get AI Controller->Unpossess->DestroyActor (ensure both the UnPossess node and the Destroy Actor node are hooked up to the return value of the GetAIController node)
  5. Place an instance of your pawn in the level
  6. PIE

Result: Notice that even after being destroyed, the AI Controller still remains in the World Outliner

Expected: The AI Controller would be removed from the World Outliner after being destroyed

Steps with Repro Project:

  1. Open the attached project
  2. PIE (If you look in the AIChar blueprint you'll see the related nodes, after 2 seconds the AI Controller will unpossess the AIChar and be destroyed)
  3. Check the World Outliner

Result: The AI Controller is printed as None to the screen, but the instance still appears to exist in the World Outliner.

Expected: The AICon instance would be removed from the World Outliner after it was destroyed.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

12
Login to Vote

By Design
ComponentUE - AI
Affects Versions4.144.154.17
CreatedApr 18, 2017
ResolvedApr 21, 2017
UpdatedApr 27, 2018