RealDocs

AAIController

class AIModule Blueprint Since 4.0
#include "AIController.h"

Description

The base controller class for AI-driven pawns. Manages a Behavior Tree, Blackboard, and perception system for autonomous NPCs.

Caveats & Gotchas

  • AAIController is created automatically when an AI pawn is spawned if AIControllerClass is set. You rarely instantiate it directly.
  • GetBlackboardComponent() returns null until UseBlackboard() or RunBehaviorTree() has been called.
  • AI logic only starts on possess if bStartAILogicOnPossess is true (default false).

Example

Run a behavior tree from BeginPlay C++
void AMyAIController::BeginPlay()
{
    Super::BeginPlay();
    RunBehaviorTree(MyBehaviorTree);
}

Functions (2)

AI
2
Access Type Name
public function AAIController::RunBehaviorTree
public function AAIController::UseBlackboard

Tags

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.