Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/Engine/GameViewportClient.h |
Include |
#include "Engine/GameViewportClient.h" |
class UGameViewportClient :
public UScriptViewportClient,
public FExec
A game viewport (FViewport) is a high-level abstract interface for the platform specific rendering, audio, and input subsystems. GameViewportClient is the engine's interface to a game viewport. Exactly one GameViewportClient is created for each instance of the game. The only case (so far) where you might have a single instance of Engine, but multiple instances of the game (and thus multiple GameViewportClients) is when you have more than one PIE window running.
Responsibilities: propagating input events to the global interactions list
Name | Description | ||
---|---|---|---|
|
TEnumAsByte< ES... |
ActiveSplitscreenType |
The splitscreen type that is actually being used; takes into account the number of players and other factors (such as cinematic mode) that could affect the splitscreen mode that is actually used. |
|
AudioDevice |
Strong handle to the audio device used by this viewport. |
|
|
AudioDeviceDestroyedHandle |
Handle to delegate in case audio device is destroyed. |
|
|
AudioDeviceHandle |
Handle to the audio device created for this viewport. |
|
|
uint32: 1 |
bDisableWorldRendering |
Set to disable world rendering |
|
bHasAudioFocus |
Whether or not this audio device is in audio-focus |
|
|
uint32: 1 |
bIsPlayInEditorViewport |
If true, this viewport is a play in editor viewport |
|
bSuppressTransitionMessage |
If true will suppress the blue transition text messages. |
|
|
TArray< struct ... |
DebugProperties |
Debug properties that have been added via one of the "displayall" commands |
|
EngineShowFlags |
The show flags used by the viewport's players. |
|
|
UGameInstance &... |
GameInstance |
|
|
MaxSplitscreenPlayers |
||
|
TArray< struct ... |
SplitscreenInfo |
Array of the screen data needed for all the different splitscreen configurations |
|
ViewModeIndex |
See enum EViewModeIndex |
|
|
Viewport |
The platform-specific viewport which this viewport client is attached to. |
|
|
UConsole * |
ViewportConsole |
The viewport's console. Might be null on consoles |
|
FViewportFrame ... |
ViewportFrame |
The platform-specific viewport frame which this viewport is contained by. |
|
UWorld * |
World |
The relative world context for this viewport |
Name | Description | |
---|---|---|
|
UGameViewportClient ( |
|
|
UGameViewportClient ( |
DO NOT USE. This constructor is for internal usage only for hot-reload purposes. |
Name | Description | |
---|---|---|
|
~UGameViewportClient() |
Name | Description | ||
---|---|---|---|
|
AddCursorWidget ( |
Sets the widget to use fore the cursor. |
|
|
AddSoftwareCursor ( |
Adds a cursor to the set based on the enum and the class reference to it. |
|
|
AddSoftwareCursorFromSlateWidget ( |
Add a cursor to the set based on the enum and a slate widget |
|
|
AddViewportWidgetContent ( |
Adds a widget to the Slate viewport's overlay (i.e for in game UI or tools) at the specified Z-order |
|
|
AddViewportWidgetForPlayer ( |
Adds a widget to the Slate viewport's overlay (i.e for in game UI or tools) at the specified Z-order. |
|
|
CalculateDeadZoneForAllSides ( |
Pixel size of the deadzone for all sides (right/left/top/bottom) based on which local player it is |
|
|
CalculateSafeZoneValues |
Calculate the amount of safezone needed for a single side for both vertical and horizontal dimensions |
|
|
ConsoleCommand ( |
Process Console Command |
|
|
ConvertLocalPlayerToGamePlayerIndex ( |
Convert a LocalPlayer to it's index in the GamePlayer array |
|
|
DetachViewportClient() |
Cleans up all rooted or referenced objects created or managed by the GameViewportClient. |
|
|
DrawTitleSafeArea ( |
Draws the safe area using the current r.DebugSafeZone.Mode=1 when there is not a valid PlayerController HUD. |
|
|
DrawTransition ( |
Displays the transition screen. |
|
|
DrawTransitionMessage |
Print a centered transition message with a drop shadow. |
|
|
EnableCsvPlayerStats ( |
||
|
FinalizeViews ( |
Make any adjustments to the views after they've been completely set up |
|
|
GetCurrentBufferVisualizationMode() |
||
|
ESplitScreen... |
GetCurrentSplitscreenConfiguration() |
|
|
UGameInstanc... |
GetGameInstance() |
Returns the relevant game instance for this viewport |
|
TSharedPtr< ... |
GetGameLayerManager() |
Gets the layer manager for the UI. |
|
const FScene... |
GetGameViewport() |
Returns the game viewport |
|
FSceneViewpo... |
GetGameViewport() |
Returns the game viewport |
|
TSharedPtr< ... |
GetGameViewportWidget() |
Returns the widget for this viewport |
|
GetIsUsingSoftwareCursorWidgets() |
Get whether or not the viewport is currently using software cursor |
|
|
GetMousePosition ( |
||
|
GetPixelSizeOfScreen |
Get the total pixel size of the screen. |
|
|
TSharedPtr< ... |
GetSoftwareCursorWidget ( |
Get the slate widget of the current software cursor |
|
GetSubtitleRegion |
Called before rending subtitles to allow the game viewport to determine the size of the subtitle area |
|
|
GetUseMouseForTouch() |
||
|
GetViewportSize ( |
Retrieve the size of the main viewport. |
|
|
TSharedPtr< ... |
GetWindow() |
Returns access to this viewport's Slate window |
|
HandleBugScreenshotCommand ( |
||
|
HandleBugScreenshotwithHUDInfoCommand ( |
||
|
HandleDisplayAllCommand ( |
||
|
HandleDisplayAllLocationCommand ( |
||
|
HandleDisplayAllRotationCommand ( |
||
|
HandleDisplayClearCommand ( |
||
|
HandleDisplayCommand ( |
||
|
HandleForceFullscreenCommand ( |
Exec command handlers |
|
|
HandleForceSkelLODCommand ( |
||
|
HandleGetAllLocationCommand ( |
||
|
HandleGetAllRotationCommand ( |
||
|
HandleHighresScreenshotCommand ( |
||
|
HandleHighresScreenshotUICommand ( |
||
|
HandleKillParticlesCommand ( |
||
|
HandleNextViewModeCommand ( |
||
|
HandlePauseRenderClockCommand ( |
||
|
HandlePreCacheCommand ( |
||
|
HandlePrevViewModeCommand ( |
||
|
HandleScreenshotCommand ( |
||
|
HandleSetResCommand ( |
||
|
HandleShowCommand ( |
||
|
HandleShowLayerCommand ( |
||
|
HandleTextureDefragCommand ( |
||
|
HandleToggleFullscreenCommand() |
||
|
HandleToggleMIPFadeCommand ( |
||
|
HandleViewModeCommand ( |
||
|
HasAudioFocus() |
||
|
HasBottomSafeZone ( |
Whether the player at LocalPlayerIndex's viewport has a "bottom of viewport" safezone or not. |
|
|
HasLeftSafeZone ( |
Whether the player at LocalPlayerIndex's viewport has a "left of viewport" safezone or not. |
|
|
HasRightSafeZone ( |
Whether the player at LocalPlayerIndex's viewport has a "right of viewport" safezone or not. |
|
|
HasSoftwareCursor ( |
Does the viewport client have a software cursor set up for the given enum? |
|
|
HasTopSafeZone ( |
Whether the player at LocalPlayerIndex's viewport has a "top of viewport" safezone or not. |
|
|
Init ( |
||
|
IsExclusiveFullscreenViewport() |
||
|
IsFullScreenViewport() |
||
|
IsSimulateInEditorViewport() |
||
|
IsSplitscreenForceDisabled() |
Determines whether splitscreen is forced to be turned off |
|
|
LayoutPlayers() |
Called before rendering to allow the game viewport to allocate subregions to players. |
|
|
NotifyPlayerAdded ( |
Notifies all interactions that a new player has been added to the list of active players. |
|
|
NotifyPlayerRemoved ( |
Notifies all interactions that a new player has been added to the list of active players. |
|
|
FSimpleMulti... |
OnBeginDraw() |
Accessor for the delegate called when the engine starts drawing a game viewport. |
|
FOnCloseRequ... |
OnCloseRequested() |
Accessor for the delegate called when a viewport is asked to close. |
|
FSimpleMulti... |
OnDrawn() |
Accessor for the delegate called when the game viewport is drawn, before drawing the console. |
|
FSimpleMulti... |
OnEndDraw() |
Accessor for the delegate called when the engine finishes drawing a game viewport. |
|
FOnGameViewp... |
OnGameViewportInputKey() |
Accessor for delegate called when a game viewport received input key |
|
FOnInputAxis... |
OnInputAxis() |
Fetches OnInputAxisEvent reference |
|
FOnInputKeyS... |
OnInputKey() |
Fetches OnInputKeyEvent reference |
|
FCustomNavig... |
OnNavigationOverride() |
Set an override handler for navigation. |
|
FOnGameViewp... |
OnPlayerAdded() |
Accessor for the delegate called when a player is added to the game viewport. |
|
FOnGameViewp... |
OnPlayerRemoved() |
Accessor for the delegate called when a player is removed from the game viewport. |
|
FOnScreensho... |
OnScreenshotCaptured() |
Accessor for delegate called when a screenshot is captured |
|
FOnGameViewp... |
OnTick() |
Accessor for the delegate called when ticking the game viewport. |
|
FOnToggleFul... |
OnToggleFullscreen() |
Accessor for delegate called when the engine toggles fullscreen |
|
FSimpleMulti... |
OnViewportCreated() |
Accessor for the delegate called when the game viewport is created. |
|
FOnViewportR... |
OnViewportRendered() |
Accessor for delegate called when a viewport is rendered |
|
FOnWindowClo... |
OnWindowCloseRequested() |
Accessor for the delegate called when the window owning the viewport is asked to close. |
|
PeekNetworkFailureMessages ( |
Notification of network error messages generally not expected to handle the failure here, but provide notification to the user |
|
|
PeekTravelFailureMessages ( |
Notification of server travel error messages, generally network connection related (package verification, client server handshaking, etc) generally not expected to handle the failure here, but provide notification to the user |
|
|
PostRender ( |
Called after rendering the player views and HUDs to render menus, the console, etc. |
|
|
RebuildCursors() |
Recreates cursor widgets from UISettings class. |
|
|
RemoveAllViewportWidgets() |
This function removes all widgets from the viewport overlay |
|
|
RemoveViewportWidgetContent ( |
Removes a previously-added widget from the Slate viewport |
|
|
RemoveViewportWidgetForPlayer ( |
Removes a previously-added widget from the Slate viewport, in the player's section. |
|
|
SetConsoleTarget ( |
Sets the player which console commands will be executed in the context of. |
|
|
SetCurrentBufferVisualizationMode ( |
||
|
SetDropDetail ( |
Sets bDropDetail and other per-frame detail level flags on the current WorldSettings |
|
|
SetForceDisableSplitscreen ( |
Allows game code to disable splitscreen (useful when in menus) |
|
|
SetGameLayerManager ( |
Assigns the viewport game layer manager for this viewport client. |
|
|
SetHardwareCursor ( |
||
|
SetHideCursorDuringCapture ( |
Sets whether or not the cursor is hidden when the viewport captures the mouse |
|
|
SetIgnoreInput ( |
Set whether to ignore input. |
|
|
SetMouseCaptureMode ( |
Set the mouse capture behavior for the viewport. |
|
|
SetMouseLockMode ( |
Sets the current mouse cursor lock mode when the viewport is clicked |
|
|
SetSuppressTransitionMessage ( |
Controls suppression of the blue transition text messages |
|
|
ULocalPlayer... |
SetupInitialLocalPlayer ( |
Initialize the game viewport. |
|
SetUseSoftwareCursorWidgets ( |
Sets whether or not the software cursor widgets are used. |
|
|
SetViewport ( |
Set this GameViewportClient's viewport to the viewport specified |
|
|
SetViewportFrame ( |
Set this GameViewportClient's viewport and viewport frame to the viewport specified |
|
|
SetViewportOverlayWidget ( |
Assigns the viewport overlay widget to use for this viewport client. |
|
|
SetVirtualCursorWidget ( |
||
|
ShouldForceFullscreenViewport() |
Determine whether a fullscreen viewport should be used in cases where there are multiple players. |
|
|
SSSwapControllers() |
Rotates controller ids among gameplayers, useful for testing splitscreen with only one controller. |
|
|
Tick ( |
Called every frame to allow the game viewport to update time based state. |
|
|
TryToggleFullscreenOnInputKey ( |
Gives the game's custom viewport client a way to handle F11 or Alt+Enter before processing the input |
|
|
UpdateActiveSplitscreenType() |
Sets the value of ActiveSplitscreenConfiguration based on the desired split-screen layout type, current number of players, and any other factors that might affect the way the screen should be laid out. |
|
|
UpdateCsvCameraStats ( |
Updates CSVProfiler camera stats |
|
|
VerifyPathRenderingComponents() |
Make sure all navigation objects have appropriate path rendering components set. |
Name | Description | ||
---|---|---|---|
|
BeginDestroy() |
Called before destroying the object. |
|
|
PostInitProperties() |
Called after the C++ constructor and after the properties have been initialized, including those loaded from config. |
Name | Description | ||
---|---|---|---|
|
float |
UpdateViewportClientWindowDPIScale() |
FCommonViewportClient interface |
Name | Description | ||
---|---|---|---|
|
Activated ( |
||
|
CaptureMouseOnLaunch() |
Gets whether or not the viewport captures the Mouse on launch of the application Technically this controls capture on the first window activate, so in situations where the application is launched but isn't activated the effect is delayed until activation. |
|
|
CloseRequested ( |
||
|
Deactivated ( |
||
|
Draw |
||
|
EMouseCursor... |
GetCursor |
Retrieves the cursor that should be displayed by the OS |
|
const TArray... |
GetEnabledStats() |
Get a ptr to the enabled stats list |
|
FEngineShowF... |
GetEngineShowFlags() |
Return the engine show flags for this viewport |
|
EMouseCaptur... |
GetMouseCaptureMode() |
Gets the mouse capture behavior when the viewport is clicked |
|
FStatHitches... |
GetStatHitchesData() |
Get a ptr to the stat unit data for this viewport |
|
FStatUnitDat... |
GetStatUnitData() |
Get a ptr to the stat unit data for this viewport |
|
UWorld * |
GetWorld() |
Returns a relative world context for this viewport. |
|
HandleNavigation ( |
Optionally do custom handling of a navigation. |
|
|
HideCursorDuringCapture() |
Gets whether or not the cursor is hidden when the viewport captures the mouse |
|
|
IgnoreInput() |
Check whether we should ignore input. |
|
|
InputAxis |
Check an axis movement received by the viewport. |
|
|
InputChar |
Check a character input received by the viewport. |
|
|
InputKey ( |
Check a key event received by the viewport. |
|
|
InputMotion |
Each frame, the input system will update the motion data. |
|
|
InputTouch |
Check a key event received by the viewport. |
|
|
IsFocused ( |
||
|
IsInPermanentCapture() |
||
|
IsOrtho() |
Returns true if this viewport is orthogonal. |
|
|
IsStatEnabled ( |
Check whether a specific stat is enabled for this viewport |
|
|
LockDuringCapture() |
Gets whether or not the cursor is locked to the viewport when the viewport captures the mouse |
|
|
LostFocus ( |
||
|
MapCursor ( |
Called to map a cursor reply to an actual widget to render. |
|
|
MouseEnter |
||
|
MouseLeave ( |
||
|
FPopupMethod... |
OnQueryPopupMethod() |
Should we make new windows for popups or create an overlay in the current window. |
|
Precache() |
||
|
ProcessScreenShots ( |
||
|
QueryShowFocus ( |
Called to determine if we should render the focus brush. |
|
|
ReceivedFocus ( |
||
|
RedrawRequested ( |
||
|
RequiresHitProxyStorage() |
||
|
RequiresUncapturedAxisInput() |
Determines whether this viewport client should receive calls to InputAxis() if the game's window is not currently capturing the mouse. |
|
|
SetEnabledStats |
Sets all the stats that should be enabled for the viewport |
|
|
SetIsSimulateInEditorViewport ( |
||
|
ShouldAlwaysLockMouse() |
Gets whether or not the cursor should always be locked to the viewport |
|
|
ShouldDPIScaleSceneCanvas() |
FViewport interface |
|
|
WindowCloseRequested() |
Called when the top level window associated with the viewport has been requested to close. |
Name | Description | ||
---|---|---|---|
|
Exec ( |
Exec handler |
Name |
Description |
---|---|
CreatedDelegate |
Delegate called when the game viewport is created. |
EnabledStats |
A list of all the stat names which are enabled for this viewport (static so they persist between runs) |
ScreenshotCapturedDelegate |
Delegate called at the end of the frame when a screenshot is captured |
ViewportRenderedDelegate |
Delegate called right after the viewport is rendered |
Name | Description | ||
---|---|---|---|
|
uint32: 1 |
bShowTitleSafeZone |
Use the cvar "r.DebugSafeZone.Mode=1". |
Name | Description | ||
---|---|---|---|
|
GetDisableSplitscreenOverride() |
GetDisableSplitscreenOverride is deprecated. Please call UGameViewportClient::IsSplitscreenForceDisabled() instead. |
|
|
InputKey ( |
Use the new InputKey(const FInputKeyEventArgs& EventArgs) function. |
|
|
SetCaptureMouseOnClick ( |
Please call UGameViewportClient::SetMouseCaptureMode(EMouseCaptureMode) instead. |
|
|
SetDisableSplitscreenOverride ( |
SetDisableSplitscreenOverride is deprecated. Please call UGameViewportClient::SetForceDisableSplitscreen(bDisabled) instead. |
|
|
SetLockDuringCapture ( |
Mouse locking is now controlled by an enum value. Please call UGameViewportClient::SetMouseLockMode(EMouseLockMode) instead. |
|
|
ShowTitleSafeArea() |
Use the cvar "r.DebugSafeZone.Mode=1". |