Navigation
API > API/Plugins > API/Plugins/MLAdapter > API/Plugins/MLAdapter/Managers
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UMLAdapterManager
- UMLAdapterNoRPCManager
References
| Module | MLAdapter |
| Header | /Engine/Plugins/AI/MLAdapter/Source/MLAdapter/Public/Managers/MLAdapterManager.h |
| Include | #include "Managers/MLAdapterManager.h" |
Syntax
UCLASS&40;Transient&41;
class UMLAdapterManager :
public UObject,
public FTickableGameObject,
public FSelfRegisteringExec
Remarks
The manager of the MLAdapter system. Sets up the RPC server for communication with remote client. Based on settings, creates and ticks the UMLAdapterSession. Tells the UMLAdapterLibrarian to gather its classes. A singleton instance is setup automatically during OnPostEngineInit if this plugin is included.
Variables
| Type | Name | Description | |
|---|---|---|---|
| uint32: 1 | bCommonFunctionsAdded | ||
| FDelegateHandle | BeginPIEHandle | ||
| uint32: 1 | bTickWorldManually | ||
| EMLAdapterServerMode | CurrentFunctionMode | ||
| uint16 | CurrentPort | ||
| uint16 | CurrentServerThreads | ||
| TArray< uint8 > | Data | ||
| FDelegateHandle | EndPIEHandle | ||
| TObjectPtr< UWorld > | LastActiveWorld | ||
| FMLAdapterLibrarian | Librarian | ||
| FOnGenericRPCServerDelegate | OnAddClientFunctions | ||
| FOnGenericRPCServerDelegate | OnAddServerFunctions | ||
| FOnGenericEvent | OnCurrentSessionChanged | ||
| FDelegateHandle | OnGameModeInitializedHandle | ||
| FDelegateHandle | OnGameModeMatchStateSetHandle | ||
| FDelegateHandle | OnGameModePostLoginHandle | ||
| FDelegateHandle | OnPostWorldInitializationHandle | ||
| FDelegateHandle | OnWorldCleanupHandle | ||
| EMLAdapterServerMode | RequestedFunctionMode | ||
| TObjectPtr< UMLAdapterSession > | Session | ||
| 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 | |
| float | WorldFPS |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UMLAdapterManager
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddCommonFunctions
(
FRPCServer& Server |
||
| void | Binds the manager's world, game mode, and editor delegates - called during PostInitProperties. | ||
| void | Cleans up all the manager's delegates - called during BeginDestroy. | ||
| void | CloseSession
(
UMLAdapterSession& InSession |
||
| void | ConfigureAsClient
(
FRPCServer& Server |
"Client" in this context means UnrealEngine game client, not RPC client. | |
| void | ConfigureAsServer
(
FRPCServer& Server |
"Server" in this context means UnrealEngine game server, not RPC server. | |
| void | ConfigureAsStandalone
(
FRPCServer& Server |
Essentially calls both the server and client versions. | |
| UMLAdapterSession * | |||
| void | EnsureAISystemPresence
(
UWorld& World |
If given World doesn't have an AI system, this call results in creating one. | |
| void | EnsureNavigationSystemPresence
(
UWorld& World |
If given World doesn't have a Navigation system instance, this call results in creating one. | |
| UMLAdapterManager & | Get () |
Inlines | |
| const FMLAdapterLibrarian & | GetLibrarian () |
Get this manager's librarian. | |
| FOnGenericRPCServerDelegate & | |||
| FOnGenericRPCServerDelegate & | |||
| FOnGenericEvent & | |||
| UMLAdapterSession & | GetSession () |
Returns the current session. If one doesn't exist, it gets created. | |
| bool | HasSession () |
||
| bool | IsReady () |
Returns true if the manager instance exists. | |
| bool | IsRunning () |
True if there is an RPC server currently running. | |
| bool | Returns true if this manager is not being ticked manually by the remote client. | ||
| void | OnBeginPIE
(
const bool bIsSimulating |
||
| void | OnEndPIE
(
const bool bIsSimulating |
||
| void | OnGameModeInitialized
(
AGameModeBase* GameMode |
Notifies the session that the game mode has initialized. | |
| void | OnGameModeMatchStateSet
(
FName MatchState |
This might not get called at all if the project's game mode doesn't extend AGameMode. | |
| void | OnGameModePostLogin
(
AGameModeBase* GameMode, |
Notifies the session a player has connected. | |
| void | OnPostWorldInit
(
UWorld* World, |
Starts the RPC server if the world is a game world | |
| void | OnWorldCleanup
(
UWorld* World, |
Closes the current session. | |
| void | |||
| void | RegisterActuatorClass
(
const TSubclassOf< UMLAdapterActuator >& Class |
Register an actuator class with this manager's librarian. | |
| void | RegisterAgentClass
(
const TSubclassOf< UMLAdapterAgent >& Class |
Register an agent class with this manager's librarian. | |
| void | RegisterSensorClass
(
const TSubclassOf< UMLAdapterSensor >& Class |
Register a sensor class with this manager's librarian. | |
| void | ResetWorld () |
||
| void | SetManualWorldTickEnabled
(
bool bEnable |
||
| void | SetSession
(
UMLAdapterSession* NewSession |
||
| bool | ShouldInitForWorld
(
const UWorld& World |
||
| void | StartServer
(
uint16 Port, |
Starts a new RPC server. | |
| void | StopServer () |
Stop the RPC server. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. | |
| void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. |
Overridden from FTickableGameObject
| Type | Name | Description | |
|---|---|---|---|
| bool | Used to determine whether the object should be ticked in the editor. | ||
| bool | Used to determine if an object should be ticked when the game is paused. |
Overridden from FTickableObjectBase
| Type | Name | Description | |
|---|---|---|---|
| TStatId | GetStatId () |
Return the stat id to use for this tickable | |
| ETickableTickType | Virtual that can be overloaded by the inheriting class. | ||
| bool | IsTickable () |
Virtual that can be overloaded by the inheriting class. | |
| void | Tick
(
float DeltaTime |
FTickableGameObject begin. |
Overridden from FExec
| Type | Name | Description | |
|---|---|---|---|
| bool | Exec
(
UWorld* InWorld, |
FExec begin. |
Typedefs
| Name | Description |
|---|---|
| FOnGenericEvent | |
| FOnGenericRPCServerDelegate | |
| FRPCFunctionBind |
Constants
| Name | Description |
|---|---|
| ManagerInstance | |
| OnPostInit |