AFunctionalAITestBase

[AFunctionalAITestBase](API\Developer\FunctionalTesting\AFunctionalAITestBase)

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

FunctionalTesting

Header

/Engine/Source/Developer/FunctionalTesting/Classes/FunctionalAITest.h

Include

#include "FunctionalAITest.h"

Syntax

class AFunctionalAITestBase : public AFunctionalTest

Remarks

AFunctionalAITestBase

Base abstract class defining a Functional AI Test. You can derive from this base class to create a test with a different type of SpawnSets.

Variables

Name Description

Protected variable

uint32: 1

 

bDebugNavMeshOnTimeout

If set, ftest will postpone start until navmesh is fully generated

Protected variable

uint32: 1

 

bSingleSetRun

Protected variable

uint32: 1

 

bWaitForNavMesh

If set, ftest will postpone start until navmesh is fully generated

Protected variable

int32

 

CurrentSpawnSetIndex

Protected variable

FString

 

CurrentSpawnSetName

Protected variable

FVector

 

NavMeshDebugExtent

Navmesh debug: extent around NavMeshDebugOrigin

Protected variable

FVector

 

NavMeshDebugOrigin

Navmesh debug: log navoctree modifiers around this point

Protected variable

FTimerHandle

 

NavmeshDelayTimer

Protected variable

FFunctionalTest...

 

OnAISpawned

Called when a single AI finished spawning

Protected variable

FFunctionalTest...

 

OnAllAISPawned

Called when a all AI finished spawning

Protected variable

TArray< FPendin...

 

PendingDelayedSpawns

Protected variable

TArray< TObject...

 

SpawnedPawns

Protected variable

float

 

SpawnLocationRandomizationRange

Constructors

Name Description

Public function

AFunctionalAITestBase

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

AddSpawnedPawn

(
    APawn& SpawnedPawn
)

Protected function

void

 

ClearPendingDelayedSpawns()

Public function Virtual

void

 

ForEachSpawnSet

(
    TFunctionRef< void...
)

Iterate through the list of spawn sets and execute Predicate on each.

Public function Virtual Const

void

 

ForEachSpawnSet

(
    TFunctionRef< void...
)

Iterate through the list of spawn sets and execute Predicate on each in a const-correct way.

Public function Const

FVector

 

GetRandomizedLocation

(
    const FVector& Location
)

Public function

FAITestSpawn...

 

GetSpawnInfo

(
    const int32 SpawnSetIndex,
    const int32 SpawnInfoIndex
)

Return the SpawnInfo at SpawnInfoIndexof the SpawnSet at SpawnSetIndex.

Public function Const

const FAITes...

 

GetSpawnInfo

(
    const int32 SpawnSetIndex,
    const int32 SpawnInfoIndex
)

Return the SpawnInfo at SpawnInfoIndexof the SpawnSet at SpawnSetIndex. Const-correct version.

Public function Virtual Const

const FAITes...

 

GetSpawnSet

(
    const int32 SpawnSetIndex
)

Return the SpawnSet at this index of the SpawnSets array. Const-correct version.

Public function Virtual

FAITestSpawn...

 

GetSpawnSet

(
    const int32 SpawnSetIndex
)

Return the SpawnSet at this index of the SpawnSets array.

Protected function Const

bool

 

IsNavMeshReady()

Public function Virtual

bool

 

IsOneOfSpawnedPawns

(
    AActor* Actor
)

Public function Virtual Const

bool

 

IsValidSpawnSetIndex

(
    const int32 Index
)

Return whether the index is valid in the SpawnSets array.

Protected function

void

 

KillOffSpawnedPawns()

Protected function

void

 

OnSpawningFailure()

Public function Virtual

void

 

RemoveSpawnSetIfPredicate

(
    TFunctionRef< bool...
)

Iterate through the list of spawn sets and remove the spawn set if Predicate returns true.

Public function

bool

 

Spawn

(
    const int32 SpawnSetIndex,
    const int32 SpawnInfoIndex
)

Spawn this AI at this SpawnInfoIndex of the SpawnSetIndex spawn set.

Protected function

void

 

StartSpawning()

Overridden from AFunctionalTest

Name Description

Public function Virtual

void

 

CleanUp()

Called to clean up when tests is removed from the list of active tests after finishing execution.

Public function Virtual Const

void

 

GatherRelevantActors

(
    TArray< AActor* >& OutActors
)

Public function Virtual Const

FString

 

GetAdditionalTestFinishedMessage

(
    EFunctionalTestResult TestResult
)

Public function Virtual Const

FString

 

GetReproString()

Public function Virtual

bool

 

IsReady_Implementation()

Public function Virtual

void

 

OnTimeout()

Public function Virtual

bool

 

RunTest

(
    const TArray< FString >& Params
)

Public function Virtual

void

 

StartTest()

Called once the IsReady() check for the test returns true.

Public function Virtual Const

bool

 

WantsToRunAgain()

Overridden from AActor

Name Description

Protected function Virtual

void

 

BeginPlay()

Overridable native event for when play begins for this actor.

Public function Virtual

void

 

Tick

(
    float DeltaSeconds
)

Function called every frame on this Actor.