UEnvQueryManager

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/EnvironmentQuery/EnvQueryManager.h

Include

#include "EnvironmentQuery/EnvQueryManager.h"

Syntax

class UEnvQueryManager :
    public UAISubsystem ,
    public FSelfRegisteringExec

Variables

Name Description

Protected variable

bool

 

bTestQueriesUsingBreadth

Whether we update EQS queries based on: running a test on one query and move to the next (breadth) - default behavior, or test an entire query before moving to the next one (depth).

Protected variable

FEQSDebugger

 

EQSDebugger

Protected variable

TMap < int32 , TW ...

 

ExternalQueries

Queries run independently from manager, mapped here for data providers

Protected variable

TArray < UEnvQue ...

 

GCShieldedWrappers

Protected variable

TArray < FEnvQue ...

 

InstanceCache

Cache of instances

Protected variable

TMap < FName , UE ...

 

LocalContextMap

Local contexts mapped by class names

Protected variable

TArray < UEnvQue ...

 

LocalContexts

Local cache of context objects for managing BP based objects

Protected variable

float

 

MaxAllowedTestingTime

How long are we allowed to test per update, in seconds.

Protected variable

int32

 

NextQueryID

Next ID for running query

Protected variable

int32

 

NumRunningQueriesAbortedSinceLastUpdate

Count of queries aborted since last update, to be removed.

Protected variable

double

 

QueryCountWarningInterval

How often (in seconds) we will warn about the number of queries (allows us to catch multiple occurrences in a session)

Protected variable

int32

 

QueryCountWarningThreshold

If greater than zero, we will warn once when the number of queries is greater than or equal to this number, and log the queries out

Protected variable

TArray < TShared ...

 

RunningQueries

Currently running queries

Protected variable

friend

 

UEnvQueryInstanceBlueprintWrapper

Constructors

Name Description

Public function

UEnvQueryManager

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function

bool

 

AbortQuery

(
    int32 RequestID
)

Aborts specific query

Protected function

TSharedPtr < ...

 

CreateQueryInstance

(
    const UEnvQuery * Template,
    EEnvQueryRunMode::Type RunMode
)

Create new instance, using cached data is possible

Public function Const

float

 

FindNamedParam

(
    int32 QueryId,
    FName ParamName
)

Find value of named param stored with active query

Protected function

TSharedPtr < ...

 

FindQueryInstance

(
    const int32 QueryID
)

Public function Const

UEnvQuery &#...

 

FindQueryTemplate

(
    const FString & QueryName
)

Finds UEnvQuery matching QueryName by first looking at instantiated queries (from InstanceCache) falling back to looking up all UEnvQuery and testing their name

Public function Static

UEnvQueryMan ...

 

GetCurrent

(
    const UObject * WorldContextObj...
)

Public function Static

UEnvQueryMan ...

 

GetCurrent

(
    UWorld * World
)

Public function

FEQSDebugger ...

 

GetDebugger()

Public function Static

void

 

NotifyAssetUpdate

(
    UEnvQuery * Query
)

Public function Virtual

void

 

OnWorldCleanup()

Fail all running queries on cleaning the world

Public function

UEnvQueryCon ...

 

PrepareLocalContext

(
    TSubclassOf < UEnvQueryContext > Con...
)

Creates local context object

Public function

TSharedPtr < ...

 

PrepareQueryInstance

(
    const FEnvQueryRequest & Request,
    EEnvQueryRunMode::Type RunMode
)

Creates a query instance configured for execution

Public function Const

void

 

PrintActiveQueryInfo()

Outputs active queries to log

Public function

void

 

RegisterActiveWrapper

Public function

void

 

RegisterExternalQuery

(
    const TSharedPtr < FEnvQueryInstance ...
)

Add information for data providers about query instance run independently

Public function

void

 

RemoveAllQueriesByQuerier

(
    const UObject & Querier,
    bool bExecuteFinishDelegate
)

Public function Static

UEnvQueryIns ...

 

RunEQSQuery

(
    UObject * WorldContextObject,
    UEnvQuery * QueryTemplate,
    UObject * Querier,
    TEnumAsByte < EEnvQueryRunMode::Type ...,
    TSubclassOf < UEnvQueryInstanceBluep ...
)

Public function

void

 

RunInstantQuery

(
    const TSharedPtr < FEnvQueryInstance ...
)

Alternative way to run queries.

Public function

TSharedPtr < ...

 

RunInstantQuery

(
    const FEnvQueryRequest & Request,
    EEnvQueryRunMode::Type RunMode
)

Alternative way to run queries.

Public function

int32

 

RunQuery

(
    const TSharedPtr < FEnvQueryInstance ...,
    FQueryFinishedSignature const& Fin...
)

Execute query

Public function

int32

 

RunQuery

(
    const FEnvQueryRequest & Request,
    EEnvQueryRunMode::Type RunMode,
    FQueryFinishedSignature const& Fin...
)

Execute query

Public function Static

void

 

SetAllowTimeSlicing

(
    bool bAllowTimeSlicing
)

Public function

void

 

SilentlyRemoveAllQueriesByQuerier

(
    const UObject & Querier
)

Removed all active queries asked by Querier.

Public function

void

 

UnregisterActiveWrapper

Public function

void

 

UnregisterExternalQuery

(
    const TSharedPtr < FEnvQueryInstance ...
)

Clear information about query instance run independently

Overridden from UObject

Name Description

Public function Virtual

void

 

FinishDestroy()

Cleanup hooks for map loading

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Public function Virtual

void

 

PostLoad()

Makes sure we don't have any UEnvQueryManager instances serialized in.

Overridden from FTickableObjectBase

Name Description

Public function Virtual Const

TStatId

 

GetStatId()

Return the stat id to use for this tickable

Public function Virtual

void

 

Tick

(
    float DeltaTime
)

FTickableGameObject begin.

Overridden from FExec

Name Description

Public function Virtual

bool

 

Exec

(
    UWorld * InWorld,
    const TCHAR * Cmd,
    FOutputDevice & Ar
)

Exec handler

Constants

Name

Description

bAllowEQSTimeSlicing

DebuggerStats

RegisteredItemTypes

List of all known item types

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