UViewportWorldGameClient
#include <ViewportWorlds/Public/ViewportWorldGameClient.h>class UViewportWorldGameClientDefined in ViewportWorldGameClient.h:19
Inherits:
UCommonGameViewportClient
Inheritance diagram
Section titled “Inheritance diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UViewportWorldGameClient["UViewportWorldGameClient"]
class UCommonGameViewportClient["UCommonGameViewportClient"]
UCommonGameViewportClient <|-- UViewportWorldGameClient
Collaboration diagram
Section titled “Collaboration diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UViewportWorldGameClient["UViewportWorldGameClient"]
class EViewportWorldViewMode["EViewportWorldViewMode"]
UViewportWorldGameClient ..> EViewportWorldViewMode
Class detail
Section titled “Class detail”---
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.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
void | UseBasicDraw | |
bool | IsUsingBasicDraw const inline | |
void | SetLocalPlayer | Set the local player associated with the viewport world game client. |
bool | SetViewportWorldViewMode | Sets the view mode for the viewport world. |
void | SetFastPostProcess | Set the fast post-process settings for the viewport world game client. |
void | MarkAsSecondaryWorld | Marks the viewport world game client as a secondary world. |
void | EnableHDR | |
TOptional< bool > | IsUsingHDR | |
VIEWPORTWORLDS_API bool | IsSecondaryViewport const inline | 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. |
EViewModeIndex | GetCurrentViewMode const inline | Get the current view mode. |
UseBasicDraw
Section titled “UseBasicDraw”void UseBasicDraw(const bool bUseBasic)Defined in ViewportWorldGameClient.h:74
References
Section titled “References”IsUsingBasicDraw
Section titled “IsUsingBasicDraw”const inline
inline bool IsUsingBasicDraw() constDefined in ViewportWorldGameClient.h:75
Section titled “Defined in ViewportWorldGameClient.h:75”SetLocalPlayer
Section titled “SetLocalPlayer”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.
Parameters
Section titled “Parameters”NewLocalPlayerThe local player to set.
References
Section titled “References”SetViewportWorldViewMode
Section titled “SetViewportWorldViewMode”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.
Parameters
Section titled “Parameters”NewViewModeThe view mode to set.
Returns
Section titled “Returns”Returns true if the CurrentWorldViewMode is different from the NewViewMode and the view mode was successfully changed, false otherwise.
References
Section titled “References”SetFastPostProcess
Section titled “SetFastPostProcess”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.
Parameters
Section titled “Parameters”NewPostProcessSettingsThe new post-process settings to be applied.
MarkAsSecondaryWorld
Section titled “MarkAsSecondaryWorld”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
References
Section titled “References”EnableHDR
Section titled “EnableHDR”void EnableHDR(const bool bEnable)Defined in ViewportWorldGameClient.h:128
References
Section titled “References”IsUsingHDR
Section titled “IsUsingHDR”TOptional< bool > IsUsingHDR()Defined in ViewportWorldGameClient.h:129
References
Section titled “References”IsSecondaryViewport
Section titled “IsSecondaryViewport”const inline
inline VIEWPORTWORLDS_API bool IsSecondaryViewport() constDefined 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.
Returns
Section titled “Returns”true if the viewport is a secondary viewport, false otherwise.
GetCurrentViewMode
Section titled “GetCurrentViewMode”const inline
inline EViewModeIndex GetCurrentViewMode() constDefined 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.
Returns
Section titled “Returns”The current view mode as an EViewModeIndex.
Referenced by
Section titled “Referenced by”References
Section titled “References”BrushWireframeCollisionPawnCollisionVisibilityLightComplexityLightmapDensityLitLightmapDensityStationaryLightOverlapWireframe
Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
TWeakObjectPtr< ULocalPlayer > | LocalPlayer | 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 | |
EViewportWorldViewMode | CurrentWorldViewMode | Represents the current view mode for the viewport world. The view mode determines how the scene is rendered in the viewport. |
FPostProcessSettings | FastRenderPostProcessSettings | |
uint8 | bIsSecondaryWorld | Represents whether the viewport world is a secondary world. |
uint8 | bUseBasicDraw | |
uint8 | bEnableHDR |
LocalPlayer
Section titled “LocalPlayer”TWeakObjectPtr< ULocalPlayer > LocalPlayerDefined 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.
Referenced by
Section titled “Referenced by”GameUserSettings
Section titled “GameUserSettings”TWeakObjectPtr< UGameUserSettings > GameUserSettingsDefined in ViewportWorldGameClient.h:27
Referenced by
Section titled “Referenced by”CurrentWorldViewMode
Section titled “CurrentWorldViewMode”EViewportWorldViewMode CurrentWorldViewModeDefined 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.
Referenced by
Section titled “Referenced by”FastRenderPostProcessSettings
Section titled “FastRenderPostProcessSettings”FPostProcessSettings FastRenderPostProcessSettingsDefined in ViewportWorldGameClient.h:53
Referenced by
Section titled “Referenced by”bIsSecondaryWorld
Section titled “bIsSecondaryWorld”uint8 bIsSecondaryWorldDefined 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.
Referenced by
Section titled “Referenced by”bUseBasicDraw
Section titled “bUseBasicDraw”uint8 bUseBasicDrawDefined in ViewportWorldGameClient.h:62
Referenced by
Section titled “Referenced by”bEnableHDR
Section titled “bEnableHDR”uint8 bEnableHDRDefined in ViewportWorldGameClient.h:63
Referenced by
Section titled “Referenced by”Private Methods
Section titled “Private Methods”| Return | Name | Description |
|---|---|---|
FSceneView * | Internal_CalcSceneView const | Calculates the scene view for the given ViewFamily and Viewport. |
void | Internal_DrawFast const | Renders the viewport world using a fast drawing method. |
Internal_CalcSceneView
Section titled “Internal_CalcSceneView”const
FSceneView * Internal_CalcSceneView(FSceneViewFamily * ViewFamily, FViewport * InViewport) constDefined 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.
Parameters
Section titled “Parameters”-
ViewFamilyA pointer to the FSceneViewFamily object representing the view family. -
InViewportA pointer to the FViewport object representing the viewport.
Returns
Section titled “Returns”A pointer to the FSceneView object representing the calculated scene view.
Referenced by
Section titled “Referenced by”References
Section titled “References”Internal_DrawFast
Section titled “Internal_DrawFast”const
void Internal_DrawFast(FViewport * InViewport, FCanvas * Canvas) constDefined 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.
Parameters
Section titled “Parameters”-
InViewportPointer to the viewport to be rendered. -
CanvasPointer to the canvas to perform the rendering.