UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FEngineLoop Class Reference

#include <LaunchEngineLoop.h>

Public Member Functions

 FEngineLoop ()
 
virtual ~FEngineLoop ()
 
int32 PreInit (int32 ArgC, TCHAR *ArgV[], const TCHAR *AdditionalCommandline=nullptr)
 
int32 PreInit (const TCHAR *CmdLine)
 
int32 PreInitPreStartupScreen (const TCHAR *CmdLine)
 
int32 PreInitPostStartupScreen (const TCHAR *CmdLine)
 
void LoadPreInitModules ()
 
bool LoadCoreModules ()
 
void OverrideProjectModule (const FString &InOriginalProjectModuleName, const FString &InReplacementProjectModuleName)
 
void CleanupPreInitContext ()
 

Static Public Member Functions

static void PostInitRHI ()
 
static void PreInitHMDDevice ()
 
static bool AppInit ()
 
static void AppPreExit ()
 
static void AppExit ()
 

Protected Attributes

TArray< floatFrameTimes
 
double TotalTickTime
 
double MaxTickTime
 
uint64 MaxFrameCounter
 
uint32 LastFrameCycles
 

Detailed Description

Implements the main engine loop.

Constructor & Destructor Documentation

◆ FEngineLoop()

FEngineLoop::FEngineLoop ( )

Default constructor.

◆ ~FEngineLoop()

virtual FEngineLoop::~FEngineLoop ( )
inlinevirtual

Member Function Documentation

◆ AppExit()

void FEngineLoop::AppExit ( )
static

Shuts down the application.

This function called outside guarded exit code, during all exits (including error exits).

◆ AppInit()

bool FEngineLoop::AppInit ( )
static

Initializes the application.

◆ AppPreExit()

void FEngineLoop::AppPreExit ( )
static

Prepares the application for shutdown.

This function is called from within guarded exit code, only during non-error exits.

◆ CleanupPreInitContext()

void FEngineLoop::CleanupPreInitContext ( )

Clean up PreInit context.

◆ LoadCoreModules()

bool FEngineLoop::LoadCoreModules ( )

Load core modules.

◆ LoadPreInitModules()

void FEngineLoop::LoadPreInitModules ( )

Load all modules needed before Init.

◆ OverrideProjectModule()

void FEngineLoop::OverrideProjectModule ( const FString &  InOriginalProjectModuleName,
const FString &  InReplacementProjectModuleName 
)

Allow override of the project module loaded from project file

◆ PostInitRHI()

void FEngineLoop::PostInitRHI ( )
static

RHI post-init initialization

◆ PreInit() [1/2]

int32 FEngineLoop::PreInit ( const TCHAR CmdLine)

Pre-Initialize the main loop - parse command line, sets up GIsEditor, etc.

Parameters
CmdLineThe command line.
Returns
The error level; 0 if successful, > 0 if there were errors.

◆ PreInit() [2/2]

int32 FEngineLoop::PreInit ( int32  ArgC,
TCHAR ArgV[],
const TCHAR AdditionalCommandline = nullptr 
)

Pre-Initialize the main loop, and generates the commandline from standard ArgC/ArgV from main().

Parameters
ArgCThe number of strings in ArgV.
ArgVThe command line parameters (ArgV[0] is expected to be the executable name).
AdditionalCommandLineOptional string to append to the command line (after ArgV is put together).
Returns
Returns the error level, 0 if successful and > 0 if there were errors.

◆ PreInitHMDDevice()

void FEngineLoop::PreInitHMDDevice ( )
static

Pre-init HMD device (if necessary).

◆ PreInitPostStartupScreen()

int32 FEngineLoop::PreInitPostStartupScreen ( const TCHAR CmdLine)

Second part of PreInit.

◆ PreInitPreStartupScreen()

int32 FEngineLoop::PreInitPreStartupScreen ( const TCHAR CmdLine)

First part of PreInit.

Member Data Documentation

◆ FrameTimes

TArray<float> FEngineLoop::FrameTimes
protected

Holds a dynamically expanding array of frame times in milliseconds (if FApp::IsBenchmarking() is set).

◆ LastFrameCycles

uint32 FEngineLoop::LastFrameCycles
protected

Holds the number of cycles in the last frame.

◆ MaxFrameCounter

uint64 FEngineLoop::MaxFrameCounter
protected

Holds the maximum number of frames to render in benchmarking mode.

◆ MaxTickTime

double FEngineLoop::MaxTickTime
protected

Holds the maximum number of seconds engine should be ticked.

◆ TotalTickTime

double FEngineLoop::TotalTickTime
protected

Holds the total time spent ticking engine.


The documentation for this class was generated from the following files: