Navigation
API > API/Plugins > API/Plugins/ModularViewports
UMG wrapper around SViewport + FSceneViewport, which allows you to compose Viewport Clients (e.g. Game Viewport Client) as Slate Widgets.
Provides properties/functions for setting up with a GameInstance, Camera, or Player.
| Name | USceneViewport |
| Type | class |
| Header File | /Engine/Plugins/Runtime/ModularViewports/Source/ModularViewports/Public/Components/SceneViewportWidget.h |
| Include Path | #include "Components/SceneViewportWidget.h" |
Syntax
UCLASS (MinimalAPI)
class USceneViewport : public UWidget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVisual → UWidget → USceneViewport
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USceneViewport
(
const FObjectInitializer& |
Components/SceneViewportWidget.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AutoLoadWorldAsset | TSoftObjectPtr< UWorld > | This world will be automatically spawned and bound to this widget upon initialization. | Components/SceneViewportWidget.h |
|
| bEnableBlending | uint8 | Allow this viewport to blend with its background. | Components/SceneViewportWidget.h |
|
| bEnableGammaCorrection | uint8 | Whether or not to enable gamma correction. Doesn't apply when rendering directly to a backbuffer. | Components/SceneViewportWidget.h |
|
| bIgnoreTextureAlpha | uint8 | If true, the viewport's texture alpha is ignored when performing blending. | Components/SceneViewportWidget.h |
|
| bPreMultipliedAlpha | uint8 | True if the viewport texture has pre-multiplied alpha | Components/SceneViewportWidget.h |
|
| bRenderDirectlyToWindow | uint8 | The Viewport Client will draw directly to the SWindow's backbuffer, skipping Slate composition. | Components/SceneViewportWidget.h |
|
| bReverseGammaCorrection | uint8 | Whether or not to reverse the gamma correction done to the texture in this viewport. | Components/SceneViewportWidget.h |
|
| Client | TStrongPtrVariant< FViewportClient > | The currently bound viewport client. | Components/SceneViewportWidget.h | |
| GameInstanceAssembly | TUniquePtr< UE::Engine::FAuxiliaryGameInstance > | Stores a Game Instance that is created from AutoLoadWorldAsset (not relevant for ShowGame). | Components/SceneViewportWidget.h | |
| SceneViewport | TSharedPtr< FSceneViewport > | Components/SceneViewportWidget.h | ||
| ViewportWidget | TSharedPtr< SViewport > | The primary SWidget that this UWidget represents. | Components/SceneViewportWidget.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UGameInstance * GetInnerGameInstance() |
If the Auto Load World Asset property of this widget was specified, returns the Game Instance which was spawned as a result. | Components/SceneViewportWidget.h |
|
void ShowCamera
(
const UCameraComponent& |
Components/SceneViewportWidget.h | ||
void ShowGame
(
const TSoftObjectPtr< UWorld >& Asset |
Components/SceneViewportWidget.h | ||
void ShowPlayer
(
ULocalPlayer& |
Components/SceneViewportWidget.h | ||
void Unbind() |
Components/SceneViewportWidget.h |