Navigation
API > API/Runtime > API/Runtime/AIModule
| Name | UBrainComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/AIModule/Classes/BrainComponent.h |
| Include Path | #include "BrainComponent.h" |
Syntax
UCLASS (ClassGroup=AI, BlueprintType, HideCategories=(Sockets, Collision), MinimalAPI)
class UBrainComponent :
public UActorComponent ,
public IAIResourceInterface
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UBrainComponent
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UBrainComponent
(
const FObjectInitializer& ObjectInitializer |
BrainComponent.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AIMessage_MoveFinished | const FName | Static names to be used with SendMessage. | BrainComponent.h |
| AIMessage_QueryFinished | const FName | BrainComponent.h | |
| AIMessage_RepathFailed | const FName | BrainComponent.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bDoLogicRestartOnUnlock | uint32 | BrainComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CacheBlackboardComponent
(
UBlackboardComponent* BBComp |
END UActorComponent overrides caches BlackboardComponent's pointer to be used with this brain component | BrainComponent.h | |
virtual void Cleanup() |
AI logic won't be needed anymore, stop all activity and run cleanup | BrainComponent.h | |
virtual void DescribeSelfToVisLog
(
FVisualLogEntry* Snapshot |
BrainComponent.h | ||
AAIController * GetAIOwner() |
BrainComponent.h | ||
| BrainComponent.h | |||
const UBlackboardComponent * GetBlackboardComponent () |
BrainComponent.h | ||
virtual FString GetDebugInfoString() |
BrainComponent.h | ||
virtual void HandleMessage
(
const FAIMessage& Message |
BrainComponent.h | ||
virtual bool IsPaused() |
BrainComponent.h |
|
|
virtual bool IsRunning() |
BrainComponent.h |
|
|
virtual void PauseLogic
(
const FString& Reason |
Pause logic and blackboard updates. | BrainComponent.h | |
void RequestLogicRestartOnUnlock () |
To be called in case we want to restart AI logic while it's still being locked. | BrainComponent.h | |
virtual void RestartLogic() |
Restarts currently running or previously ran brain logic. | BrainComponent.h |
|
virtual EAILogicResuming::Type ResumeLogic
(
const FString& Reason |
Resumes paused brain logic. MUST be called by child implementations! | BrainComponent.h | |
virtual void StartLogic() |
Starts brain logic. If brain is already running, will not do anything. | BrainComponent.h |
|
virtual void StopLogic
(
const FString& Reason |
Stops currently running brain logic. | BrainComponent.h |
|
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void InitializeComponent() |
BEGIN UActorComponent overrides | BrainComponent.h | |
virtual void OnRegister() |
BrainComponent.h | ||
virtual void TickComponent
(
float DeltaTime, |
BrainComponent.h |
Overridden from IAIResourceInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ClearResourceLock
(
EAIRequestPriority::Type LockSource |
Clear resource lock of the given origin | BrainComponent.h | |
virtual void ForceUnlockResource() |
Force-clears all locks on resource | BrainComponent.h | |
virtual bool IsResourceLocked() |
Check whether resource is currently locked | BrainComponent.h | |
virtual void LockResource
(
EAIRequestPriority::Type LockSource |
If resource is lockable lock it with indicated priority | BrainComponent.h |