Skip to content

UViewportWorldGameClient

#include <ViewportWorlds/Public/ViewportWorldGameClient.h>
class UViewportWorldGameClient

Defined in ViewportWorldGameClient.h:19

Inherits: UCommonGameViewportClient

---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UViewportWorldGameClient["UViewportWorldGameClient"]
  class UCommonGameViewportClient["UCommonGameViewportClient"]
  UCommonGameViewportClient <|-- UViewportWorldGameClient
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UViewportWorldGameClient["UViewportWorldGameClient"]
  class EViewportWorldViewMode["EViewportWorldViewMode"]
  UViewportWorldGameClient ..> EViewportWorldViewMode
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UViewportWorldGameClient {
    +UseBasicDraw(const bool bUseBasic)
    +IsUsingBasicDraw() const bool
    +SetLocalPlayer(ULocalPlayer *NewLocalPlayer)
    +SetViewportWorldViewMode(const EViewportWorldViewMode &NewViewMode) bool
    +SetFastPostProcess(const FPostProcessSettings &NewPostProcessS
    +MarkAsSecondaryWorld()
    +EnableHDR(const bool bEnable)
    +IsUsingHDR() TOptional< bool >
    +IsSecondaryViewport() const VIEWPORTWORLDS_API bool
    +GetCurrentViewMode() const EViewModeIndex
    +LocalPlayer : TWeakObjectPtr< ULocalPlayer >
    +GameUserSettings : TWeakObjectPtr< UGameUserSettings >
    +CurrentWorldViewMode : EViewportWorldViewMode()
    +FastRenderPostProcessSettings : FPostProcessSettings
    +bIsSecondaryWorld : uint8
    +bUseBasicDraw : uint8
    +bEnableHDR : uint8
    +Internal_CalcSceneView(FSceneViewFamily *ViewFamily, FViewport *In FSceneView *
    +Internal_DrawFast(FViewport *InViewport, FCanvas *Canvas) con
  }

A class that represents the game client for a viewport world. This class inherits from UCommonGameViewportClient and adds additional functionality specific to viewport worlds.

ReturnNameDescription
voidUseBasicDraw
boolIsUsingBasicDraw const inline
voidSetLocalPlayerSet the local player associated with the viewport world game client.
boolSetViewportWorldViewModeSets the view mode for the viewport world.
voidSetFastPostProcessSet the fast post-process settings for the viewport world game client.
voidMarkAsSecondaryWorldMarks the viewport world game client as a secondary world.
voidEnableHDR
TOptional< bool >IsUsingHDR
VIEWPORTWORLDS_API boolIsSecondaryViewport const inlineReturns a boolean value indicating whether the current viewport is a secondary viewport or not. A secondary viewport is a viewport that is not the primary viewport and is used for purposes such as split-screen or multi-window support.
EViewModeIndexGetCurrentViewMode const inlineGet the current view mode.

void UseBasicDraw(const bool bUseBasic)

Defined in ViewportWorldGameClient.h:74


const inline

inline bool IsUsingBasicDraw() const
void SetLocalPlayer(ULocalPlayer * NewLocalPlayer)

Defined in ViewportWorldGameClient.h:85 Set the local player associated with the viewport world game client.

This method allows you to set the local player associated with the viewport world game client. The local player represents the player who controls the in-game character in the viewport world.

  • NewLocalPlayer The local player to set.

bool SetViewportWorldViewMode(const EViewportWorldViewMode & NewViewMode)

Defined in ViewportWorldGameClient.h:106 Sets the view mode for the viewport world.

This method allows you to set the view mode for the viewport world. The view mode determines how the scene is rendered in the viewport. The possible values for the NewViewMode parameter are:

  • EViewportWorldViewMode::Lit: The scene is rendered with lighting applied.

  • EViewportWorldViewMode::BrushWireframe: The scene is rendered in wireframe mode, with brush wireframes visible.

  • EViewportWorldViewMode::Wireframe: The scene is rendered in wireframe mode.

  • EViewportWorldViewMode::LightComplexity: The scene is rendered with light complexity visualization.

  • EViewportWorldViewMode::LightmapDensity: The scene is rendered with lightmap density visualization.

  • EViewportWorldViewMode::LitLightmapDensity: The scene is rendered with lit lightmap density visualization.

  • EViewportWorldViewMode::StationaryLightOverlap: The scene is rendered with stationary light overlap visualization.

  • EViewportWorldViewMode::CollisionPawn: The scene is rendered with collision pawn visualization.

  • EViewportWorldViewMode::CollisionVisibility: The scene is rendered with collision visibility visualization.

  • NewViewMode The view mode to set.

Returns true if the CurrentWorldViewMode is different from the NewViewMode and the view mode was successfully changed, false otherwise.


void SetFastPostProcess(const FPostProcessSettings & NewPostProcessSettings)

Defined in ViewportWorldGameClient.h:116 Set the fast post-process settings for the viewport world game client.

This method allows the user to set the fast post-process settings for the viewport world game client. The fast post-process settings control the post-processing effects applied to the rendered image in the viewport world.

  • NewPostProcessSettings The new post-process settings to be applied.

void MarkAsSecondaryWorld()

Defined in ViewportWorldGameClient.h:126 Marks the viewport world game client as a secondary world.

This method sets the flag bIsSecondaryWorld to true, indicating that the game client represents a secondary world in the viewport.

See also: bIsSecondaryWorld


void EnableHDR(const bool bEnable)

Defined in ViewportWorldGameClient.h:128


TOptional< bool > IsUsingHDR()

Defined in ViewportWorldGameClient.h:129


const inline

inline VIEWPORTWORLDS_API bool IsSecondaryViewport() const

Defined in ViewportWorldGameClient.h:137 Returns a boolean value indicating whether the current viewport is a secondary viewport or not. A secondary viewport is a viewport that is not the primary viewport and is used for purposes such as split-screen or multi-window support.

true if the viewport is a secondary viewport, false otherwise.


const inline

inline EViewModeIndex GetCurrentViewMode() const

Defined in ViewportWorldGameClient.h:177 Get the current view mode.

This method returns the current view mode for the viewport world. The view mode determines how the world is displayed in the viewport.

The current view mode as an EViewModeIndex.

  • BrushWireframe
  • CollisionPawn
  • CollisionVisibility
  • LightComplexity
  • LightmapDensity
  • LitLightmapDensity
  • StationaryLightOverlap
  • Wireframe
ReturnNameDescription
TWeakObjectPtr< ULocalPlayer >LocalPlayerA weak reference to the local player associated with the viewport world game client which represents the player who controls the in-game character in the viewport world.
TWeakObjectPtr< UGameUserSettings >GameUserSettings
EViewportWorldViewModeCurrentWorldViewModeRepresents the current view mode for the viewport world. The view mode determines how the scene is rendered in the viewport.
FPostProcessSettingsFastRenderPostProcessSettings
uint8bIsSecondaryWorldRepresents whether the viewport world is a secondary world.
uint8bUseBasicDraw
uint8bEnableHDR

TWeakObjectPtr< ULocalPlayer > LocalPlayer

Defined in ViewportWorldGameClient.h:24 A weak reference to the local player associated with the viewport world game client which represents the player who controls the in-game character in the viewport world.


TWeakObjectPtr< UGameUserSettings > GameUserSettings

Defined in ViewportWorldGameClient.h:27


EViewportWorldViewMode CurrentWorldViewMode

Defined in ViewportWorldGameClient.h:43 Represents the current view mode for the viewport world. The view mode determines how the scene is rendered in the viewport.

Possible values for this variable are:

  • Lit: The scene is rendered with lighting applied.

  • BrushWireframe: The scene is rendered in wireframe mode, with brush wireframes visible.

  • Wireframe: The scene is rendered in wireframe mode.

  • LightComplexity: The scene is rendered with light complexity visualization.

  • LightmapDensity: The scene is rendered with lightmap density visualization.

  • LitLightmapDensity: The scene is rendered with lit lightmap density visualization.

  • StationaryLightOverlap: The scene is rendered with stationary light overlap visualization.

  • CollisionPawn: The scene is rendered with collision pawn visualization.

  • CollisionVisibility: The scene is rendered with collision visibility visualization.


FPostProcessSettings FastRenderPostProcessSettings

Defined in ViewportWorldGameClient.h:53


uint8 bIsSecondaryWorld

Defined in ViewportWorldGameClient.h:61 Represents whether the viewport world is a secondary world.

The bIsSecondaryWorld variable is used to indicate whether the viewport world is a secondary world. A secondary world is a world that is not the primary world, such as an instance of a level being played inside a viewport in UMG. This variable is set to false by default.


uint8 bUseBasicDraw

Defined in ViewportWorldGameClient.h:62


uint8 bEnableHDR

Defined in ViewportWorldGameClient.h:63

ReturnNameDescription
FSceneView *Internal_CalcSceneView constCalculates the scene view for the given ViewFamily and Viewport.
voidInternal_DrawFast constRenders the viewport world using a fast drawing method.

const

FSceneView * Internal_CalcSceneView(FSceneViewFamily * ViewFamily, FViewport * InViewport) const

Defined in ViewportWorldGameClient.h:153 Calculates the scene view for the given ViewFamily and Viewport.

This method calculates the scene view using the provided ViewFamily and Viewport. It initializes the necessary options and variables, including the view origin, view rotation, view rectangle, aspect ratio axis constraint, projection matrix, background color, anti-aliasing method, post-process settings, and camera-constrained view rectangle. Finally, it returns the calculated scene view.

  • ViewFamily A pointer to the FSceneViewFamily object representing the view family.

  • InViewport A pointer to the FViewport object representing the viewport.

A pointer to the FSceneView object representing the calculated scene view.


const

void Internal_DrawFast(FViewport * InViewport, FCanvas * Canvas) const

Defined in ViewportWorldGameClient.h:166 Renders the viewport world using a fast drawing method.

This method is called to render the viewport world using a fast drawing method. It takes a pointer to the viewport and the canvas to perform the rendering. The rendering process involves determining the time and delta time, setting up the scene view family context, calculating the scene view, setting the screen percentage, clearing the canvas, setting the view mode, rendering the view family, and removing temporary debug lines.

  • InViewport Pointer to the viewport to be rendered.

  • Canvas Pointer to the canvas to perform the rendering.