UGameEngine

Engine that manages core systems that enable a game.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/GameEngine.h

Include

#include "Engine/GameEngine.h"

Syntax

class UGameEngine : public UEngine

Remarks

Engine that manages core systems that enable a game.

Variables

Name Description

Public variable

UGameInstance &...

 

GameInstance

Public variable

TSharedPtr< cla...

 

GameViewportWidget

The game viewport widget

Public variable

TWeakPtr< class...

 

GameViewportWindow

The game viewport window

Public variable

float

 

MaxDeltaTime

Maximium delta time the engine uses to populate FApp::DeltaTime. If 0, unbound.

Public variable

TSharedPtr< cla...

 

SceneViewport

The primary scene viewport

Public variable

float

 

ServerFlushLogInterval

Maximium time (in seconds) between the flushes of the logs on the server (best effort).

Protected variable

FMovieSceneCapt...

 

StartupMovieCaptureHandle

Handle to a movie capture implementation to create on startup

Constructors

Name Description

Public function

UGameEngine

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Static

void

 

ConditionallyOverrideSettings

(
    int32& ResolutionX,
    int32& ResolutionY,
    EWindowMode::Type& WindowMode
)

Modifies the game window resolution settings if any overrides have been specified on the command line

Public function

void

 

CreateGameViewport

(
    UGameViewportClient* GameViewp...
)

Creates the game viewport

Public function

void

 

CreateGameViewportWidget

(
    UGameViewportClient* GameViewp...
)

Creates the viewport widget where the games SlateUI is added to.

Public function Static

TSharedRef< ...

 

CreateGameWindow()

Creates the game window

Public function Static

void

 

DetermineGameWindowResolution

(
    int32& ResolutionX,
    int32& ResolutionY,
    EWindowMode::Type& WindowMode,
    bool bUseWorkAreaForWindowed
)

Determines the resolution of the game window, ensuring that the requested size is never bigger than the available desktop size

Protected function Const

FSceneViewpo...

 

GetGameSceneViewport

(
    UGameViewportClient* ViewportC...
)

Public function

UWorld *

 

GetGameWorld()

This is a global, parameterless function used by the online subsystem modules.

Public function

bool

 

HandleApplyUserSettingsCommand

(
    const TCHAR* Cmd,
    FOutputDevice& Ar
)

Public function

bool

 

HandleCancelCommand

(
    const TCHAR* Cmd,
    FOutputDevice& Ar,
    UWorld* InWorld
)

Public function

bool

 

HandleCommand

(
    const TCHAR* Cmd,
    FOutputDevice& Ar
)

Exec command handlers.

Public function

bool

 

HandleExitCommand

(
    const TCHAR* Cmd,
    FOutputDevice& Ar
)

Public function

bool

 

HandleGetMaxTickRateCommand

(
    const TCHAR* Cmd,
    FOutputDevice& Ar
)

Public function

bool

 

HandleMinimizeCommand

(
    const TCHAR* Cmd,
    FOutputDevice& Ar
)

Public function

void

 

OnGameWindowClosed

(
    const TSharedRef< SWindow >& Windo...
)

Called when the game window closes (ends the game)

Public function

void

 

OnGameWindowMoved

(
    const TSharedRef< SWindow >& Windo...
)

Called when the game window is moved

Public function

void

 

OnViewportResized

(
    FViewport* Viewport,
    uint32 Unused
)

Public function Static

void

 

SafeFrameChanged()

Public function

void

 

SwitchGameWindowToUseGameViewport()

Changes the game window to use the game viewport instead of any loading screen or movie that might be using it instead

Overridden from UEngine

Name Description

Public function Virtual Const

TSharedPtr< ...

 

GetGameViewportWidget()

Returns the GameViewport widget

Public function Virtual Const

float

 

GetMaxTickRate

(
    float DeltaTime,
    bool bAllowFrameRateSmoothing
)

Get tick rate limiter.

Get tick rate limitor.

Protected function Virtual

void

 

HandleBrowseToDefaultMapFailure

(
    FWorldContext& Context,
    const FString& TextURL,
    const FString& Error
)

Attempts to gracefully handle a failure to travel to the default map.

Public function Virtual

void

 

Init

(
    IEngineLoop* InEngineLoop
)

Initialize the game engine.

Public function Virtual

bool

 

NetworkRemapPath

(
    UNetConnection* Connection,
    FString& Str,
    bool bReading
)

Public function Virtual

void

 

PreExit()

Called at shutdown, just before the exit purge.

Public function Virtual

void

 

ProcessToggleFreezeCommand

(
    UWorld* InWorld
)

Handles freezing/unfreezing of rendering

Public function Virtual

void

 

ProcessToggleFreezeStreamingCommand

(
    UWorld* InWorld
)

Handles frezing/unfreezing of streaming

Public function Virtual

void

 

RedrawViewports

(
    bool bShouldPresent
)

Redraws all viewports.

Public function Virtual Const

bool

 

ShouldDoAsyncEndOfFrameTasks()

Public function Virtual

void

 

Start()

Start the game, separate from the initialize call to allow for post initialize configuration before the game starts.

Public function Virtual

void

 

Tick

(
    float DeltaSeconds,
    bool bIdleMode
)

Update everything.

Overridden from UObject

Name Description

Public function Virtual

void

 

FinishDestroy()

Called to finish destroying the object.

Overridden from FExec

Name Description

Public function Virtual

bool

 

Exec

(
    UWorld* InWorld,
    const TCHAR* Cmd,
    FOutputDevice& Ar
)

Exec handler

Deprecated Functions

Name Description

Public function Virtual

bool

 

NetworkRemapPath

(
    UNetDriver* Driver,
    FString& Str,
    bool bReading
)

Please use NetworkRemapPath that takes a connection instead.

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