Navigation
Unreal Engine C++ API Reference > Runtime > AIModule
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- UBrainComponent
- UBehaviorTreeComponent
- UHTNBrainComponent
- UStateTreeComponent
References
Module | AIModule |
Header | /Engine/Source/Runtime/AIModule/Classes/BrainComponent.h |
Include | #include "BrainComponent.h" |
Syntax
class UBrainComponent :
public UActorComponent,
public IAIResourceInterface
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TObjectPtr< AAIController > | AIOwner | |
![]() |
TObjectPtr< UBlackboardComponent > | BlackboardComp | Blackboard component |
![]() |
TArray< FAIMessageObserver * > | MessageObservers | Active message observers |
![]() |
TArray< FAIMessage > | MessagesToProcess | This is a temp contraption to implement delayed messages delivering until proper AI messaging is implemented |
![]() |
FAIResourceLock | ResourceLock | Used to keep track of which subsystem requested this AI resource be locked |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UBrainComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | CacheBlackboardComponent
(
UBlackboardComponent* BBComp |
END UActorComponent overrides caches BlackboardComponent's pointer to be used with this brain component |
![]() ![]() |
void | Cleanup () |
AI logic won't be needed anymore, stop all activity and run cleanup |
![]() ![]() ![]() |
void | DescribeSelfToVisLog
(
FVisualLogEntry* Snapshot |
|
![]() ![]() |
AAIController * | GetAIOwner () |
|
![]() |
UBlackboardComponent * | ||
![]() ![]() |
const UBlackboardComponent * | ||
![]() ![]() ![]() |
FString | ||
![]() ![]() |
void | HandleMessage
(
const FAIMessage& Message |
|
![]() ![]() ![]() |
bool | IsPaused () |
|
![]() ![]() ![]() |
bool | IsRunning () |
|
![]() ![]() |
void | PauseLogic
(
const FString& Reason |
Pause logic and blackboard updates. |
![]() |
void | To be called in case we want to restart AI logic while it's still being locked. | |
![]() ![]() |
void | RestartLogic () |
Restarts currently running or previously ran brain logic. |
![]() ![]() |
EAILogicResuming::Type | ResumeLogic
(
const FString& Reason |
Resumes paused brain logic. MUST be called by child implementations! |
![]() ![]() |
void | StartLogic () |
Starts brain logic. If brain is already running, will not do anything. |
![]() ![]() |
void | Stops currently running brain logic. |
Overridden from UActorComponent
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | BEGIN UActorComponent overrides | |
![]() ![]() |
void | OnRegister () |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. |
![]() ![]() |
void | TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. |
Overridden from IAIResourceInterface
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | ClearResourceLock
(
EAIRequestPriority::Type LockSource |
Clear resource lock of the given origin |
![]() ![]() |
void | Force-clears all locks on resource | |
![]() ![]() ![]() |
bool | Check whether resource is currently locked | |
![]() ![]() |
void | LockResource
(
EAIRequestPriority::Type LockSource |
If resource is lockable lock it with indicated priority |
Constants
Name | Description |
---|---|
AIMessage_MoveFinished | Static names to be used with SendMessage. |
AIMessage_QueryFinished | |
AIMessage_RepathFailed |