UE4U4MLSession

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UE4ML

Header

/Engine/Plugins/AI/UE4ML/Source/UE4ML/Public/4MLSession.h

Include

#include "4MLSession.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class UE4U4MLSession : public UObject

Variables

Name Description

Protected variable

FDelegateHandle

 

ActorSpawnedDelegateHandle

Protected variable

FCriticalSectio...

 

AgentOpCS

Protected variable UProperty

TArray< U4MLAge...

 

Agents

Protected variable UProperty

TMap< uint32, U...

 

AvatarToAgent

Protected variable UProperty

TArray< U4MLAge...

 

AwaitingAvatar

Protected variable

bool

 

bActive

Protected variable

bool

 

bTickWorldManually

Protected variable UProperty

AGameModeBase &...

 

CachedGameMode

Protected variable UProperty

UWorld *

 

CachedWorld

Protected variable

float

 

LastTimestamp

Protected variable

FOnAgentAvatarC...

 

OnAgentAvatarChanged

Protected variable

FOnBeginAgentRe...

 

OnBeginAgentRemove

Protected variable

E4MLSimState

 

SimulationState

Protected variable

TSharedPtr< FWo...

 

WorldTicker

Functions

Name Description

Public function

F4ML::FAgent...

 

AddAgent()

Agent/Avatar management.

Public function

F4ML::FAgent...

 

AddAgent

(
    const F4MLAgentConfig& InConfig
)

Agent/Avatar management.

Public function

void

 

BindAvatar

(
    U4MLAgent& Agent,
    AActor& Avatar
)

Public function

void

 

ClearAvatar

(
    U4MLAgent& Agent
)

Public function Virtual

void

 

Close()

Public function Virtual

void

 

ConfigureAsClient()

This is where Session can add Client-side-specific functions by calling U4MLManager::Get().AddClientFunctionBind.

Public function Virtual

void

 

ConfigureAsServer()

This is where Session can add Authority-side-specific functions by calling U4MLManager::Get().AddServerFunctionBind

Public function Const

const U4MLAg...

 

FindAgentByAvatar

(
    AActor& Avatar
)

Public function

void

 

FindAvatars

(
    UWorld& World
)

Finds avatar in given World for every avatar-less agent in AwaitingAvatar

Public function

U4MLAgent &#...

 

GetAgent

(
    F4ML::FAgentID AgentID
)

Public function Const

int32

 

GetAgentsCount()

Public function Const

UGameInstanc...

 

GetGameInstance()

Public function Const

F4ML::FAgent...

 

GetNextAgentID

(
    F4ML::FAgentID ReferenceAgentID
)

That the return value might be equal to ReferenceAgentID if there's only one agent.

Public function

FOnAgentAvat...

 

GetOnAgentAvatarChanged()

Public function

FOnBeginAgen...

 

GetOnBeginAgentRemove()

Public function Const

float

 

GetTimestamp()

Public function Virtual Const

UWorld *

 

GetWorld()

Protected function Static

uint32

 

HashAvatar

(
    const AActor& Avatar
)

Public function Const

bool

 

IsAgentReady

(
    F4ML::FAgentID AgentID
)

Public function Const

bool

 

IsDone()

Public function Const

bool

 

IsReady()

Public function Virtual

void

 

OnActorSpawned

(
    AActor* InActor
)

Public function Virtual

void

 

OnGameModeInitialized

(
    AGameModeBase& GameModeBase
)

Public function Virtual

void

 

OnGameModeMatchStateSet

(
    FName InMatchState
)

Public function Virtual

void

 

OnGameModePostLogin

(
    AGameModeBase* GameMode,
    APlayerController* NewPlayer
)

Public function Virtual

void

 

OnPostWorldInit

(
    UWorld& World
)

Public function Virtual

void

 

OnWorldCleanup

(
    UWorld& World,
    bool bSessionEnded,
    bool bCleanupResources
)

Public function Virtual

void

 

Open()

Public function

void

 

RemoveAgent

(
    F4ML::FAgentID AgentID
)

Public function

void

 

RemoveAvatars

(
    UWorld* World
)

Processes Agents and removes all agent avatars belonging to World.

Public function

bool

 

RequestAvatarForAgent

(
    F4ML::FAgentID& AgentID,
    UWorld* InWorld
)

Public function Virtual

bool

 

RequestAvatarForAgent

(
    U4MLAgent& Agent,
    UWorld* InWorld,
    const bool bForceSearch
)

Finds a suitable avatar in InWorld (or CachedWorld, if InWorld is null) for given agent, as specified by F4MLAgentConfig.AvatarClass and confirmed by Agent->IsSuitableAvatar call.

Public function Virtual

void

 

ResetWorld

(
    F4ML::FAgentID AgentID
)

Using F4ML::InvalidAgentID for AgentID will reset all agents

Protected function Virtual

void

 

SetGameMode

(
    AGameModeBase* GameModeBase
)

Debug

Public function

void

 

SetManualWorldTickEnabled

(
    bool bEnable
)

Public function Virtual

void

 

SetWorld

(
    UWorld* NewWorld
)

NewWorld might be null

Public function

void

 

Tick

(
    float DeltaTime
)

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

void

 

PostInitProperties()

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

Classes

Name

Description

Protected struct

FWorldTicker

Typedefs

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss