Navigation
API > API/Runtime > API/Runtime/AIModule > API/Runtime/AIModule/BehaviorTree
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- UBlackboardComponent
References
| Module | AIModule |
| Header | /Engine/Source/Runtime/AIModule/Classes/BehaviorTree/BlackboardComponent.h |
| Include | #include "BehaviorTree/BlackboardComponent.h" |
Syntax
class UBlackboardComponent : public UActorComponent
Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UBlackboardData > | BlackboardAsset | Internal use, current BB asset being used. Will be made private in the future | |
| uint32: 1 | bPausedNotifies | Set when observation notifies are paused and shouldn't be passed to observers | |
| TObjectPtr< UBrainComponent > | BrainComp | Cached behavior tree component | |
| uint32: 1 | bSynchronizedKeyPopulated | Reset to false every time a new BB asset is assigned to this component | |
| TObjectPtr< UBlackboardData > | DefaultBlackboardAsset | Data asset defining entries. | |
| TArray< TObjectPtr< UBlackboardKeyType > > | KeyInstances | Instanced keys with custom data allocations | |
| int32 | NotifyObserversRecursionCount | Count of re-entrant observer notifications | |
| TMultiMap< const UObject *, FDelegateHandle > | ObserverHandles | Observers registered from owner objects | |
| TMultiMap< FBlackboard::FKey, FOnBlackboardChangeNotificationInfo > | Observers | Observers registered for blackboard keys | |
| int32 | ObserversToRemoveCount | Count of observers to remove | |
| TArray< FBlackboard::FKey > | QueuedUpdates | Queued key change notification, will be processed on ResumeUpdates call | |
| Tooltip | |||
| friend | UBlackboardKeyType | ||
| TArray< uint8 > | ValueMemory | Memory block holding all values | |
| TArray< uint16 > | ValueOffsets | Offsets in ValueMemory for each key |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UBlackboardComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | CacheBrainComponent
(
UBrainComponent& BrainComponent |
Caches UBrainComponent pointer to be used in communication | |
| void | ClearValue
(
FBlackboard::FKey KeyID |
||
| void | ClearValue
(
const FName& KeyName |
||
| EBlackboardCompare::Type | CompareKeyValues
(
TSubclassOf< UBlackboardKeyType > KeyType, |
Compares blackboard's values under specified keys | |
| bool | CopyKeyValue
(
FBlackboard::FKey SourceKeyID, |
Copy content from SourceKeyID to DestinationID and return true if it worked | |
| FString | DescribeKeyValue
(
const FName& KeyName, |
Get description of value under given key | |
| FString | DescribeKeyValue
(
FBlackboard::FKey KeyID, |
Get description of value under given key | |
| void | DescribeSelfToVisLog
(
FVisualLogEntry* Snapshot |
Prepare blackboard snapshot for logs | |
| void | Destroy allocated values | ||
| UBlackboardData * | |||
| UBrainComponent * | |||
| FString | |||
| FBlackboard::FKey | |||
| FName | GetKeyName
(
FBlackboard::FKey KeyID |
END UActorComponent overrides | |
| const uint8 * | GetKeyRawData
(
FBlackboard::FKey KeyID |
||
| const uint8 * | GetKeyRawData
(
const FName& KeyName |
||
| uint8 * | GetKeyRawData
(
FBlackboard::FKey KeyID |
||
| uint8 * | GetKeyRawData
(
const FName& KeyName |
Get pointer to raw data for given key | |
| TSubclassOf< UBlackboardKeyType > | GetKeyType
(
FBlackboard::FKey KeyID |
||
| bool | GetLocationFromEntry
(
const FName& KeyName, |
Return false if call failed (most probably no such entry in BB) | |
| bool | GetLocationFromEntry
(
FBlackboard::FKey KeyID, |
Return false if call failed (most probably no such entry in BB) | |
| int32 | GetNumKeys () |
||
| bool | GetRotationFromEntry
(
const FName& KeyName, |
Return false if call failed (most probably no such entry in BB) | |
| bool | GetRotationFromEntry
(
FBlackboard::FKey KeyID, |
Return false if call failed (most probably no such entry in BB) | |
| TDataClass::FDataType | GetValue
(
FBlackboard::FKey KeyID |
||
| TDataClass::FDataType | |||
| bool | GetValueAsBool
(
const FName& KeyName |
||
| UClass * | GetValueAsClass
(
const FName& KeyName |
||
| uint8 | GetValueAsEnum
(
const FName& KeyName |
||
| float | GetValueAsFloat
(
const FName& KeyName |
||
| int32 | GetValueAsInt
(
const FName& KeyName |
||
| FName | GetValueAsName
(
const FName& KeyName |
||
| UObject * | GetValueAsObject
(
const FName& KeyName |
||
| FRotator | GetValueAsRotator
(
const FName& KeyName |
||
| FString | GetValueAsString
(
const FName& KeyName |
||
| FVector | GetValueAsVector
(
const FName& KeyName |
||
| bool | |||
| bool | InitializeBlackboard
(
UBlackboardData& NewAsset |
Setup component for using given blackboard asset, returns true if blackboard is properly initialized for specified blackboard data | |
| void | InitializeParentChain
(
UBlackboardData* NewAsset |
Initializes parent chain in asset | |
| bool | IsCompatibleWith
(
const UBlackboardData* TestAsset |
||
| bool | IsKeyInstanceSynced
(
FBlackboard::FKey KeyID |
||
| bool | IsKeyOfType
(
FBlackboard::FKey KeyID |
||
| PRAGMA_DISABLE_DEPRECATION_WARNINGSbool | IsValidKey
(
FBlackboard::FKey KeyID |
||
| bool | IsVectorValueSet
(
FBlackboard::FKey KeyID |
||
| void | NotifyObservers
(
FBlackboard::FKey KeyID |
Notifies behavior tree decorators about change in blackboard | |
| void | Pause observer change notifications, any new ones will be added to a queue | ||
| void | Populates BB's synchronized entries | ||
| FDelegateHandle | RegisterObserver
(
FBlackboard::FKey KeyID, |
Register observer for blackboard key | |
| void | ResumeObserverNotifications
(
bool bSendQueuedObserverNotifications |
Resume observer change notifications and, optionally, process the queued observation list | |
| bool | SetValue
(
FBlackboard::FKey KeyID, |
||
| bool | |||
| void | SetValueAsBool
(
const FName& KeyName, |
||
| void | SetValueAsClass
(
const FName& KeyName, |
||
| void | SetValueAsEnum
(
const FName& KeyName, |
||
| void | SetValueAsFloat
(
const FName& KeyName, |
||
| void | SetValueAsInt
(
const FName& KeyName, |
||
| void | SetValueAsName
(
const FName& KeyName, |
||
| void | SetValueAsObject
(
const FName& KeyName, |
||
| void | SetValueAsRotator
(
const FName& KeyName, |
||
| void | SetValueAsString
(
const FName& KeyName, |
||
| void | SetValueAsVector
(
const FName& KeyName, |
||
| bool | ShouldSyncWithBlackboard
(
UBlackboardComponent& OtherBlackboardComponent |
||
| void | UnregisterObserver
(
FBlackboard::FKey KeyID, |
Unregister observer from blackboard key | |
| void | UnregisterObserversFrom
(
const UObject* NotifyOwner |
Unregister all observers associated with given owner |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| void | BEGIN UActorComponent overrides | ||
| void | Handle this component being Uninitialized. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FOnBlackboardChangeNotificationInfo |