UBrainComponent

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/BrainComponent.h

Include

#include "BrainComponent.h"

Syntax

class UBrainComponent :
    public UActorComponent,
    public IAIResourceInterface

Variables

Name Description

Protected variable

AAIController &...

 

AIOwner

Protected variable

UBlackboardComp...

 

BlackboardComp

Blackboard component

Protected variable

TArray< FAIMess...

 

MessageObservers

Active message observers

Protected variable

TArray< FAIMess...

 

MessagesToProcess

This is a temp contraption to implement delayed messages delivering until proper AI messaging is implemented

Protected variable

FAIResourceLock

 

ResourceLock

Used to keep track of which subsystem requested this AI resource be locked

Constructors

Name Description

Public function

UBrainComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

CacheBlackboardComponent

(
    UBlackboardComponent* BBComp
)

END UActorComponent overrides caches BlackboardComponent's pointer to be used with this brain component

Public function Virtual

void

 

Cleanup()

AI logic won't be needed anymore, stop all activity and run cleanup

Public function Virtual Const

void

 

DescribeSelfToVisLog

(
    FVisualLogEntry* Snapshot
)

Public function Const

AAIControlle...

 

GetAIOwner()

Public function

UBlackboardC...

 

GetBlackboardComponent()

Public function Const

const UBlack...

 

GetBlackboardComponent()

Public function Virtual Const

FString

 

GetDebugInfoString()

Public function Virtual

void

 

HandleMessage

(
    const FAIMessage& Message
)

Public function Virtual Const

bool

 

IsPaused()

Public function Virtual Const

bool

 

IsRunning()

Public function Virtual

void

 

PauseLogic

(
    const FString& Reason
)

Public function

void

 

RequestLogicRestartOnUnlock()

To be called in case we want to restart AI logic while it's still being locked.

Public function Virtual

void

 

RestartLogic()

Public function Virtual

EAILogicResu...

 

ResumeLogic

(
    const FString& Reason
)

MUST be called by child implementations!

Public function Virtual

void

 

StopLogic

(
    const FString& Reason
)

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

InitializeComponent()

BEGIN UActorComponent overrides

Public function Virtual

void

 

OnRegister()

Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.

Public function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction* T...
)

Function called every frame on this ActorComponent.

Overridden from IAIResourceInterface

Name Description

Public function Virtual

void

 

ClearResourceLock

(
    EAIRequestPriority::Type LockSource
)

Clear resource lock of the given origin

Public function Virtual

void

 

ForceUnlockResource()

Force-clears all locks on resource

Public function Virtual Const

bool

 

IsResourceLocked()

Check whether resource is currently locked

Public function Virtual

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

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback