UMLAdapterManager

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MLAdapter

Header

/Engine/Plugins/AI/MLAdapter/Source/MLAdapter/Public/MLAdapterManager.h

Include

#include "MLAdapterManager.h"

Syntax

UCLASS(Transient)
class UMLAdapterManager :
    public UObject,
    public FTickableGameObject,
    public FSelfRegisteringExec

Variables

Name Description

Protected variable

uint32: 1

 

bCommonFunctionsAdded

Protected variable

uint32: 1

 

bTickWorldManually

Protected variable

EMLAdapterServe...

 

CurrentFunctionMode

Protected variable

uint16

 

CurrentPort

Protected variable

uint16

 

CurrentServerThreads

Protected variable

TArray< uint8 >

 

Data

Protected variable UProperty

UWorld *

 

LastActiveWorld

Protected variable UProperty

FMLAdapterLibra...

 

Librarian

Protected variable

FOnGenericRPCSe...

 

OnAddClientFunctions

Protected variable

FOnGenericRPCSe...

 

OnAddServerFunctions

Protected variable

FOnGenericEvent

 

OnCurrentSessionChanged

Protected variable

EMLAdapterServe...

 

RequestedFunctionMode

Protected variable UProperty

UMLAdapterSessi...

 

Session

Protected variable

int32

 

StepsRequested

Is the manager is in 'manual ticking mode' (where external client is responsible for progressing the world sim by calling 'request_world_tick' function) the simulation will progress by StepsRequested ticks before pausing

Protected variable

float

 

WorldFPS

Constructors

Name Description

Public function

UMLAdapterManager

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function

void

 

AddCommonFunctions

(
    FRPCServer& Server
)

Public function Virtual

void

 

BindToDelegates()

Public function Virtual

void

 

CloseSession

(
    UMLAdapterSession& InSession
)

Public function Virtual

void

 

ConfigureAsClient

(
    FRPCServer& Server
)

"Client" in this context means UnrealEngine game client, not RPC client

Public function Virtual

void

 

ConfigureAsServer

(
    FRPCServer& Server
)

Public function Virtual

void

 

ConfigureAsStandalone

(
    FRPCServer& Server
)

Essentially calls both the server and client versions

Public function Virtual

UMLAdapterSe...

 

CreateNewSession()

Public function Virtual

void

 

EnsureAISystemPresence

(
    UWorld& World
)

If given World doesn't have an AI system this call results in creating one

Public function Virtual

void

 

EnsureNavigationSystemPresence

(
    UWorld& World
)

If given World doesn't have a Navigation system instance this call results in creating one

Public function Static

UMLAdapterMa...

 

Get()

Inlines

Public function Const

const FMLAda...

 

GetLibrarian()

Public function

FOnGenericRP...

 

GetOnAddClientFunctions()

Public function

FOnGenericRP...

 

GetOnAddServerFunctions()

Public function

FOnGenericEv...

 

GetOnCurrentSessionChanged()

Public function Virtual

UMLAdapterSe...

 

GetSession()

Returns current sesison. If one doesn't exist, it gets created.

Public function Const

bool

 

HasSession()

Public function Static

bool

 

IsReady()

Public function Virtual Const

bool

 

IsRunning()

Public function Const

bool

 

IsWorldRealTime()

Public function Virtual

void

 

OnBeginPIE

(
    const bool bIsSimulating
)

Public function Virtual

void

 

OnEndPIE

(
    const bool bIsSimulating
)

Public function Virtual

void

 

OnGameModeInitialized

(
    AGameModeBase* GameMode
)

Public function Virtual

void

 

OnGameModeMatchStateSet

(
    FName MatchState
)

@note that this might not get called at all if the project's game mode doesn't extend AGameMode

Public function Virtual

void

 

OnGameModePostLogin

(
    AGameModeBase* GameMode,
    APlayerController* NewPlayer
)

Public function Virtual

void

 

OnPostWorldInit

(
    UWorld* World,
    const UWorld::InitializationValues
)

Public function Virtual

void

 

OnWorldCleanup

(
    UWorld* World,
    bool bSessionEnded,
    bool bCleanupResources
)

Public function

void

 

RegisterActuatorClass

(
    const TSubclassOf< UMLAdapterActuat...
)

Public function

void

 

RegisterAgentClass

(
    const TSubclassOf< UMLAdapterAgent ...
)

Public function

void

 

RegisterSensorClass

(
    const TSubclassOf< UMLAdapterSensor...
)

Public function Virtual

void

 

ResetWorld()

Public function

void

 

SetManualWorldTickEnabled

(
    bool bEnable
)

Public function Virtual

void

 

SetSession

(
    UMLAdapterSession* NewSession
)

Public function Virtual

void

 

StartServer

(
    uint16 Port,
    EMLAdapterServerMode InMode,
    uint16 ServerThreads
)

If a server is already running it will be shut down before the new instance gets created

Public function Virtual

void

 

StopServer()

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.

Overridden from FTickableGameObject

Name Description

Public function Virtual Const

bool

 

IsTickableInEditor()

Used to determine whether the object should be ticked in the editor.

Public function Virtual Const

bool

 

IsTickableWhenPaused()

Used to determine if an object should be ticked when the game is paused.

Overridden from FTickableObjectBase

Name Description

Public function Virtual Const

TStatId

 

GetStatId()

Return the stat id to use for this tickable

Public function Virtual Const

ETickableTic...

 

GetTickableTickType()

Virtual that can be overloaded by the inheriting class.

Public function Virtual Const

bool

 

IsTickable()

Virtual that can be overloaded by the inheriting class.

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
)

FExec begin.

Typedefs

Constants

Name

Description

ManagerInstance

OnPostInit