Navigation
API > API/Runtime > API/Runtime/Engine
Engine that manages core systems that enable a game.
| Name | UGameEngine |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/GameEngine.h |
| Include Path | #include "Engine/GameEngine.h" |
Syntax
UCLASS (Config=Engine, Transient, MinimalAPI)
class UGameEngine : public UEngine
Inheritance Hierarchy
- FExec → UEngine → UGameEngine
- UObjectBase → UObjectBaseUtility → UObject → UEngine → UGameEngine
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UGameEngine
(
const FObjectInitializer& ObjectInitializer |
Engine/GameEngine.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| GameInstance | TObjectPtr< UGameInstance > | Engine/GameEngine.h |
|
|
| GameViewportWidget | TSharedPtr< class SViewport > | The game viewport widget | Engine/GameEngine.h | |
| GameViewportWindow | TWeakPtr< class SWindow > | The game viewport window | Engine/GameEngine.h | |
| MaxDeltaTime | float | Maximium delta time the engine uses to populate FApp::DeltaTime. If 0, unbound. | Engine/GameEngine.h |
|
| SceneViewport | TSharedPtr< class FSceneViewport > | The primary scene viewport | Engine/GameEngine.h | |
| ServerFlushLogInterval | float | Maximium time (in seconds) between the flushes of the logs on the server (best effort). | Engine/GameEngine.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CmdExec | TPimplPtr< FEngineConsoleCommandExecutor > | Engine/GameEngine.h | ||
| LastTimeLogsFlushed | double | Last time the logs have been flushed. | Engine/GameEngine.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CreateGameViewport
(
UGameViewportClient* GameViewportClient |
Creates the game viewport | Engine/GameEngine.h | |
void CreateGameViewportWidget
(
UGameViewportClient* GameViewportClient |
Creates the viewport widget where the games SlateUI is added to. | Engine/GameEngine.h | |
UWorld * GetGameWorld () |
This is a global, parameterless function used by the online subsystem modules. | Engine/GameEngine.h | |
bool HandleApplyUserSettingsCommand
(
const TCHAR* Cmd, |
Engine/GameEngine.h | ||
bool HandleCancelCommand
(
const TCHAR* Cmd, |
Engine/GameEngine.h | ||
bool HandleCommand
(
const TCHAR* Cmd, |
Exec command handlers. | Engine/GameEngine.h | |
bool HandleExitCommand
(
const TCHAR* Cmd, |
Engine/GameEngine.h | ||
bool HandleGetMaxTickRateCommand
(
const TCHAR* Cmd, |
Engine/GameEngine.h | ||
bool HandleMinimizeCommand
(
const TCHAR* Cmd, |
Engine/GameEngine.h | ||
void OnGameWindowClosed
(
const TSharedRef< SWindow >& WindowBeingClosed |
Called when the game window closes (ends the game) | Engine/GameEngine.h | |
void OnGameWindowMoved
(
const TSharedRef< SWindow >& WindowBeingMoved |
Called when the game window is moved | Engine/GameEngine.h | |
void OnGPUCrash() |
Called when the RHI detects a GPU crash. This can be called from any thread. | Engine/GameEngine.h | |
void OnViewportResized
(
FViewport* Viewport, |
Engine/GameEngine.h | ||
void SwitchGameWindowToUseGameViewport() |
Changes the game window to use the game viewport instead of any loading screen or movie that might be using it instead | Engine/GameEngine.h |
Overridden from UEngine
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedPtr< SViewport > GetGameViewportWidget() |
Returns the GameViewport widget | Engine/GameEngine.h | |
virtual float GetMaxTickRate
(
float DeltaTime, |
Get tick rate limiter.Get tick rate limitor. | Engine/GameEngine.h | |
virtual void Init
(
IEngineLoop* InEngineLoop |
Initialize the game engine. | Engine/GameEngine.h | |
virtual bool NetworkRemapPath
(
UNetConnection* Connection, |
Engine/GameEngine.h | ||
virtual void PreExit() |
Called at shutdown, just before the exit purge. | Engine/GameEngine.h | |
virtual void ProcessToggleFreezeCommand
(
UWorld* InWorld |
Handles freezing/unfreezing of rendering | Engine/GameEngine.h | |
virtual void ProcessToggleFreezeStreamingCommand
(
UWorld* InWorld |
Handles frezing/unfreezing of streaming | Engine/GameEngine.h | |
virtual void RedrawViewports
(
bool bShouldPresent |
Redraws all viewports. | Engine/GameEngine.h | |
virtual bool ShouldDoAsyncEndOfFrameTasks() |
Engine/GameEngine.h | ||
virtual void Start() |
Start the game, separate from the initialize call to allow for post initialize configuration before the game starts. | Engine/GameEngine.h | |
virtual void Tick
(
float DeltaSeconds, |
Update everything. | Engine/GameEngine.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void FinishDestroy() |
Engine/GameEngine.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSceneViewport * GetGameSceneViewport
(
UGameViewportClient* ViewportClient |
Engine/GameEngine.h |
Overridden from UEngine
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void HandleBrowseToDefaultMapFailure
(
FWorldContext& Context, |
Attempts to gracefully handle a failure to travel to the default map. | Engine/GameEngine.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void ConditionallyOverrideSettings
(
int32& ResolutionX, |
Modifies the game window resolution settings if any overrides have been specified on the command line and overrides are enabled (see EnableGameWindowSettingsOverride) | Engine/GameEngine.h | |
static TSharedRef< SWindow > CreateGameWindow() |
Creates the game window | Engine/GameEngine.h | |
static void DetermineGameWindowResolution
(
int32& ResolutionX, |
Determines the resolution of the game window, ensuring that the requested size is never bigger than the available desktop size | Engine/GameEngine.h | |
static void EnableGameWindowSettingsOverride
(
bool bEnabled |
Enables/disables game window resolution setting overrides specified on the command line (true by default) | Engine/GameEngine.h | |
static void SafeFrameChanged() |
Engine/GameEngine.h |