RealDocs

UBlackboardComponent

class AIModule Blueprint Since 4.0
#include "BehaviorTree/BlackboardComponent.h"

Description

A component that stores key-value pairs for AI decision-making. Acts as shared memory between the behavior tree, decorators, services, and C++ game code.

Caveats & Gotchas

  • Keys must be defined in the UBlackboardData asset in the editor — you cannot add keys at runtime.
  • Get the component via AAIController::GetBlackboardComponent(). It is null until UseBlackboard() or RunBehaviorTree() has been called.
  • Key names are FName lookups — typos silently fail and return default values. Prefer caching key IDs with GetKeyID() in production code.

Example

Write and read a blackboard value from C++ C++
UBlackboardComponent* BB = AIController->GetBlackboardComponent();
BB->SetValueAsObject(FName("TargetActor"), EnemyActor);

UObject* Target = BB->GetValueAsObject(FName("TargetActor"));

Functions (52)

Lifecycle
2
Access Type Name
public function UBlackboardComponent::InitializeComponent
public function UBlackboardComponent::UninitializeComponent
Blackboard
50
Access Type Name
public function UBlackboardComponent::GetBlackboardAsset
public function UBlackboardComponent::GetLocationFromEntry
public function UBlackboardComponent::GetValueAsBool
public function UBlackboardComponent::GetValueAsInt
public function UBlackboardComponent::HasValidAsset
public function UBlackboardComponent::SetValueAsBool
public function UBlackboardComponent::SetValueAsInt
public function UBlackboardComponent::ClearValue
public function UBlackboardComponent::CopyKeyValue
public function UBlackboardComponent::GetKeyID
public function UBlackboardComponent::GetKeyName
public function UBlackboardComponent::GetKeyType
public function UBlackboardComponent::GetNumKeys
public function UBlackboardComponent::GetRotationFromEntry
public function UBlackboardComponent::GetValueAsClass
public function UBlackboardComponent::GetValueAsEnum
public function UBlackboardComponent::GetValueAsFloat
public function UBlackboardComponent::GetValueAsName
public function UBlackboardComponent::GetValueAsObject
public function UBlackboardComponent::GetValueAsRotator
public function UBlackboardComponent::GetValueAsString
public function UBlackboardComponent::GetValueAsVector
public function UBlackboardComponent::InitializeBlackboard
public function UBlackboardComponent::IsValidKey
public function UBlackboardComponent::IsVectorValueSet
public function UBlackboardComponent::SetValueAsClass
public function UBlackboardComponent::SetValueAsEnum
public function UBlackboardComponent::SetValueAsFloat
public function UBlackboardComponent::SetValueAsName
public function UBlackboardComponent::SetValueAsObject
public function UBlackboardComponent::SetValueAsRotator
public function UBlackboardComponent::SetValueAsString
public function UBlackboardComponent::SetValueAsVector
public function UBlackboardComponent::UnregisterObserversFrom
public function UBlackboardComponent::CacheBrainComponent
public function UBlackboardComponent::CompareKeyValues
public function UBlackboardComponent::DescribeKeyValue
public function UBlackboardComponent::DescribeSelfToVisLog
public function UBlackboardComponent::GetBrainComponent
public function UBlackboardComponent::GetDebugInfoString
public function UBlackboardComponent::GetKeyRawData
public function UBlackboardComponent::GetValue
public function UBlackboardComponent::IsCompatibleWith
public function UBlackboardComponent::IsKeyInstanceSynced
public function UBlackboardComponent::IsKeyOfType
public function UBlackboardComponent::PauseObserverNotifications
public function UBlackboardComponent::RegisterObserver
public function UBlackboardComponent::ResumeObserverNotifications
public function UBlackboardComponent::SetValue
public function UBlackboardComponent::UnregisterObserver

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.