Ai controller can never be destroyed or be garbaged collected

For anyone else still running into this problem… as noted above, the DestroyActor() node in blueprints has no effect, but there are other options that are just as simple – use either one of these:

  • call the SetLifeSpan() node with a non-zero value (zero is equivalent to “indefinite” in this case), OR

  • set AutoDestroyWhenFinished to TRUE

I use one of these nodes in my AI Controller blueprint’s OnUnPossess event, as well as SetActorTickEnabled(false) in the case of SetLifeSpan() in order to stop processing Tick events immediately.

Either of these methods appears to properly remove my AI Controller instance from the world outliner (and hopefully garbage collected etc).

Hope this helps!

17 Likes