UBlackboardComponent

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/BehaviorTree/BlackboardComponent.h

Include

#include "BehaviorTree/BlackboardComponent.h"

Syntax

class UBlackboardComponent : public UActorComponent

Variables

Name Description

Protected variable

UBlackboardData...

 

BlackboardAsset

Protected variable

uint32: 1

 

bPausedNotifies

Set when observation notifies are paused and shouldn't be passed to observers

Protected variable

UBrainComponent...

 

BrainComp

Cached behavior tree component

Protected variable

uint32: 1

 

bSynchronizedKeyPopulated

Reset to false every time a new BB asset is assigned to this component

Protected variable

UBlackboardData...

 

DefaultBlackboardAsset

Data asset defining entries

Protected variable

TArray< UBlackb...

 

KeyInstances

Instanced keys with custom data allocations

Protected variable

TMultiMap< UObj...

 

ObserverHandles

Observers registered from owner objects

Protected variable

TMultiMap< uint...

 

Observers

Observers registered for blackboard keys

Protected variable

TArray< uint8 >

 

QueuedUpdates

Queued key change notification, will be processed on ResumeUpdates call

Public variable

 

Tooltip

Protected variable

friend

 

UBlackboardKeyType

Protected variable

TArray< uint8 >

 

ValueMemory

Memory block holding all values

Protected variable

TArray< uint16 ...

 

ValueOffsets

Offsets in ValueMemory for each key

Constructors

Name Description

Public function

UBlackboardComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

CacheBrainComponent

(
    UBrainComponent& BrainComponent
)

Caches UBrainComponent pointer to be used in communication

Public function

void

 

ClearValue

(
    FBlackboard::FKey KeyID
)

Public function

void

 

ClearValue

(
    const FName& KeyName
)

Public function Const

EBlackboardC...

 

CompareKeyValues

(
    TSubclassOf< UBlackboardKeyType > K...,
    FBlackboard::FKey KeyA,
    FBlackboard::FKey KeyB
)

Compares blackboard's values under specified keys

Public function

bool

 

CopyKeyValue

(
    FBlackboard::FKey SourceKeyID,
    FBlackboard::FKey DestinationID
)

Copy content from SourceKeyID to DestinationID and return true if it worked

Public function Const

FString

 

DescribeKeyValue

(
    FBlackboard::FKey KeyID,
    EBlackboardDescription::Type Mode
)

Get description of value under given key

Public function Const

FString

 

DescribeKeyValue

(
    const FName& KeyName,
    EBlackboardDescription::Type Mode
)

Get description of value under given key

Public function Virtual Const

void

 

DescribeSelfToVisLog

(
    FVisualLogEntry* Snapshot
)

Prepare blackboard snapshot for logs

Protected function

void

 

DestroyValues()

Destroy allocated values

Public function Const

UBlackboardD...

 

GetBlackboardAsset()

Public function Const

UBrainCompon...

 

GetBrainComponent()

Public function Const

FString

 

GetDebugInfoString

Public function Const

FBlackboard:...

 

GetKeyID

(
    const FName& KeyName
)

Public function Const

FName

 

GetKeyName

(
    FBlackboard::FKey KeyID
)

END UActorComponent overrides

Public function Const

const uint8 ...

 

GetKeyRawData

(
    FBlackboard::FKey KeyID
)

Public function Const

const uint8 ...

 

GetKeyRawData

(
    const FName& KeyName
)

Public function

uint8 *

 

GetKeyRawData

(
    FBlackboard::FKey KeyID
)

Public function

uint8 *

 

GetKeyRawData

(
    const FName& KeyName
)

Get pointer to raw data for given key

Public function Const

TSubclassOf<...

 

GetKeyType

(
    FBlackboard::FKey KeyID
)

Public function Const

bool

 

GetLocationFromEntry

(
    FBlackboard::FKey KeyID,
    FVector& ResultLocation
)

Return false if call failed (most probably no such entry in BB)

Public function Const

bool

 

GetLocationFromEntry

(
    const FName& KeyName,
    FVector& ResultLocation
)

Return false if call failed (most probably no such entry in BB)

Public function Const

int32

 

GetNumKeys()

Public function Const

bool

 

GetRotationFromEntry

(
    const FName& KeyName,
    FRotator& ResultRotation
)

Return false if call failed (most probably no such entry in BB)

Public function Const

bool

 

GetRotationFromEntry

(
    FBlackboard::FKey KeyID,
    FRotator& ResultRotation
)

Return false if call failed (most probably no such entry in BB)

Public function Const

TDataClass::...

 

GetValue

(
    const FName& KeyName
)

Public function Const

TDataClass::...

 

GetValue

(
    FBlackboard::FKey KeyID
)

Public function Const

bool

 

GetValueAsBool

(
    const FName& KeyName
)

Public function Const

UClass *

 

GetValueAsClass

(
    const FName& KeyName
)

Public function Const

uint8

 

GetValueAsEnum

(
    const FName& KeyName
)

Public function Const

float

 

GetValueAsFloat

(
    const FName& KeyName
)

Public function Const

int32

 

GetValueAsInt

(
    const FName& KeyName
)

Public function Const

FName

 

GetValueAsName

(
    const FName& KeyName
)

Public function Const

UObject *...

 

GetValueAsObject

(
    const FName& KeyName
)

Public function Const

FRotator

 

GetValueAsRotator

(
    const FName& KeyName
)

Public function Const

FString

 

GetValueAsString

(
    const FName& KeyName
)

Public function Const

FVector

 

GetValueAsVector

(
    const FName& KeyName
)

Public function Const

bool

 

HasValidAsset()

Public function

bool

 

InitializeBlackboard

(
    UBlackboardData& NewAsset
)

Setup component for using given blackboard asset, returns true if blackboard is properly initialized for specified blackboard data

Protected function

void

 

InitializeParentChain

(
    UBlackboardData* NewAsset
)

Initializes parent chain in asset

Public function Const

bool

 

IsCompatibleWith

(
    UBlackboardData* TestAsset
)

Public function Const

bool

 

IsKeyInstanceSynced

(
    FBlackboard::FKey KeyID
)

Public function Const

bool

 

IsKeyOfType

(
    FBlackboard::FKey KeyID
)

Public function Const

bool

 

IsValidKey

(
    FBlackboard::FKey KeyID
)

Public function Const

bool

 

IsVectorValueSet

(
    FBlackboard::FKey KeyID
)

Protected function Const

void

 

NotifyObservers

(
    FBlackboard::FKey KeyID
)

Notifies behavior tree decorators about change in blackboard

Public function

void

 

PauseObserverNotifications()

Pause observer change notifications, any new ones will be added to a queue

Protected function

void

 

PopulateSynchronizedKeys()

Populates BB's synchronized entries

Public function

FDelegateHan...

 

RegisterObserver

(
    FBlackboard::FKey KeyID,
    UObject* NotifyOwner,
    FOnBlackboardChangeNotification Obs...
)

Register observer for blackboard key

Public function

void

 

ResumeObserverNotifications

(
    bool bSendQueuedObserverNotificatio...
)

Resume observer change notifications and, optionally, process the queued observation list

Public function

bool

 

SetValue

(
    FBlackboard::FKey KeyID,
    typename TDataClass::FDataType Valu...
)

Public function

bool

 

SetValue

(
    const FName& KeyName,
    typename TDataClass::FDataType Valu...
)

Public function

void

 

SetValueAsBool

(
    const FName& KeyName,
    bool BoolValue
)

Public function

void

 

SetValueAsClass

(
    const FName& KeyName,
    UClass* ClassValue
)

Public function

void

 

SetValueAsEnum

(
    const FName& KeyName,
    uint8 EnumValue
)

Public function

void

 

SetValueAsFloat

(
    const FName& KeyName,
    float FloatValue
)

Public function

void

 

SetValueAsInt

(
    const FName& KeyName,
    int32 IntValue
)

Public function

void

 

SetValueAsName

(
    const FName& KeyName,
    FName NameValue
)

Public function

void

 

SetValueAsObject

(
    const FName& KeyName,
    UObject* ObjectValue
)

Public function

void

 

SetValueAsRotator

(
    const FName& KeyName,
    FRotator VectorValue
)

Public function

void

 

SetValueAsString

(
    const FName& KeyName,
    FString StringValue
)

Public function

void

 

SetValueAsVector

(
    const FName& KeyName,
    FVector VectorValue
)

Protected function Const

bool

 

ShouldSyncWithBlackboard

(
    UBlackboardComponent& OtherBlackbo...
)

Public function

void

 

UnregisterObserver

(
    FBlackboard::FKey KeyID,
    FDelegateHandle ObserverHandle
)

Unregister observer from blackboard key

Public function

void

 

UnregisterObserversFrom

(
    UObject* NotifyOwner
)

Unregister all observers associated with given owner

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

InitializeComponent()

BEGIN UActorComponent overrides

Public function Virtual

void

 

UninitializeComponent()

Handle this component being Uninitialized.

Deprecated Functions

Name Description

Public function

void

 

PauseUpdates()

Please call PauseObserverUpdates.

Public function

void

 

ResumeUpdates()

Please call ResumeObserverNotifications.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss