Navigation
API > API/Editor > API/Editor/LevelEditor
Encapsulates an SViewport and an SLevelViewportToolBar
| Name | SLevelViewport |
| Type | class |
| Header File | /Engine/Source/Editor/LevelEditor/Public/SLevelViewport.h |
| Include Path | #include "SLevelViewport.h" |
Syntax
class SLevelViewport :
public SAssetEditorViewport,
public IAssetViewport
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → SEditorViewport → SAssetEditorViewport → SLevelViewport
- FSlateControlledConstruction → SWidget → SCompoundWidget → SEditorViewport → SAssetEditorViewport → SLevelViewport
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SLevelViewport() |
SLevelViewport.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~SLevelViewport() |
SLevelViewport.h |
Classes
| Name | Remarks |
|---|---|
| FViewportActorPreview | Contains information about an actor being previewed within this viewport |
Structs
| Name | Remarks |
|---|---|
| EViewTransition | Types of transition effects we support |
| FArguments |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| bInViewportMenuEnabled | bool | SLevelViewport.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActionableMessageViewportWidget | TSharedPtr< SActionableMessageViewportWidget > | Viewport widget for warning messages | SLevelViewport.h | |
| ActiveViewport | TSharedPtr< class FSceneViewport > | Active Slate viewport for rendering and I/O (Could be a pie viewport) | SLevelViewport.h | |
| ActorPreviewHorizontalBox | TSharedPtr< SHorizontalBox > | Viewport horizontal box used internally for drawing actor previews on top of the level viewport | SLevelViewport.h | |
| ActorPreviews | TArray< FViewportActorPreview > | List of actor preview objects | SLevelViewport.h | |
| AlwaysPreviewActors | TSet< TWeakObjectPtr< AActor > > | Storage for actors we always want to preview. This comes from MU transactions . | SLevelViewport.h | |
| bIsInViewportMenuInitialized | bool | SLevelViewport.h | ||
| bIsInViewportMenuShowing | bool | SLevelViewport.h | ||
| BlackBackground | const FSlateBrush * | The brush to use for a black background | SLevelViewport.h | |
| bNeedToUpdatePreviews | bool | Flag to know if we need to update the previews which is handled in the tick. | SLevelViewport.h | |
| bPIEContainsFocus | bool | Whether the PIE view contains focus (even if not captured), if so we disable throttling. | SLevelViewport.h | |
| bPIEHasFocus | bool | Whether the PIE view has focus so we can track when to reshow the mouse control label | SLevelViewport.h | |
| bShowEditorToolbar | bool | Whether to show the editor toolbar | SLevelViewport.h | |
| bShowImmersivePIEToolbar | bool | Whether to show the in-PIE toolbar in immersive mode | SLevelViewport.h | |
| bShowPIEToolbar | bool | Whether to show the in-PIE toolbar | SLevelViewport.h | |
| bViewTransitionAnimPending | bool | True if we want to kick off a transition animation but are waiting for the next tick to do so | SLevelViewport.h | |
| CachedOnDropLocalMousePos | FIntPoint | Caching off of the DragDropEvent Local Mouse Position grabbed from OnDrop | SLevelViewport.h | |
| CachedPerspectiveCameraTransform | FViewportCameraTransform | Used to store last perspective camera transform before piloting (Actor Lock) Once piloting ends, this transform is re-applied to the camera. | SLevelViewport.h | |
| CaptureRegionWidget | TSharedPtr< class SCaptureRegionWidget > | Pointer to the capture region widget in the viewport overlay. | SLevelViewport.h | |
| ConfigKey | FName | The current viewport config key | SLevelViewport.h | |
| DebuggingBorder | const FSlateBrush * | The brush to use if this viewport is in debug mode | SLevelViewport.h | |
| DroppedObjects | TArray< UObject * > | Array of objects dropped during the OnDrop event | SLevelViewport.h | |
| GameLayerManager | TSharedPtr< SGameLayerManager > | SLevelViewport.h | ||
| HighResScreenshotDialog | TWeakPtr< class SWindow > | Weak pointer to the highres screenshot dialog if it's open. | SLevelViewport.h | |
| InactiveViewport | TSharedPtr< class FSceneViewport > | Inactive Slate viewport for rendering and I/O If this is valid there is a pie viewport and this is the previous level viewport scene viewport | SLevelViewport.h | |
| InactiveViewportWidgetEditorContent | TSharedPtr< SWidget > | When in PIE this will contain the editor content for the viewport widget (toolbar). | SLevelViewport.h | |
| InViewportMenu | TSharedPtr< class SInViewportDetails > | SLevelViewport.h | ||
| InViewportMenuWrapper | TSharedPtr< class SWidget > | SLevelViewport.h | ||
| LevelViewportClient | PRAGMA_ENABLE_DEPRECATION_WARNINGS TSharedPtr< FLevelEditorViewportClient > | Level viewport client | SLevelViewport.h | |
| LevelViewportToolBar | PRAGMA_DISABLE_DEPRECATION_WARNINGS TSharedPtr< SLevelViewportToolBar > | SLevelViewport.h | ||
| NonMaximizedBorder | const FSlateBrush * | The brush to use when the viewport is not maximized | SLevelViewport.h | |
| ParentLayout | TWeakPtr< class FLevelViewportLayout > | Tab which this viewport is located in | SLevelViewport.h | |
| ParentLevelEditor | TWeakPtr< ILevelEditor > | Pointer to the parent level editor for this viewport | SLevelViewport.h | |
| PIECommands | TSharedPtr< FUICommandList > | Commands specifically for PIE | SLevelViewport.h | |
| PIEOverlayAnim | FCurveSequence | Separate curve to control fading out the PIE mouse control label | SLevelViewport.h | |
| PIEOverlayBorder | TSharedPtr< class SBorder > | The border in the SOverlay for the PIE mouse control label | SLevelViewport.h | |
| PIEPreviewFeatureLevelChangedHandle | FDelegateHandle | When PIE is active, the handle for the change feature level delegate | SLevelViewport.h | |
| PIEViewportOverlayWidget | TSharedPtr< SOverlay > | Viewport overlay widget exposed to game systems when running play-in-editor | SLevelViewport.h | |
| PlayClient | TWeakObjectPtr< UGameViewportClient > | The GameViewportClient | SLevelViewport.h | |
| ReturningToEditorBorder | const FSlateBrush * | The brush to use when returning back to the editor from PIE or SIE mode | SLevelViewport.h | |
| StartingPlayInEditorBorder | const FSlateBrush * | The brush to use when transitioning into Play in Editor mode | SLevelViewport.h | |
| StartingSimulateBorder | const FSlateBrush * | The brush to use when transitioning into Simulate mode | SLevelViewport.h | |
| UserAllowThrottlingValue | int32 | The users value for allowing throttling, we restore this value when we lose focus. | SLevelViewport.h | |
| ViewTransitionAnim | FCurveSequence | Animation progress within current view transition | SLevelViewport.h | |
| ViewTransitionType | EViewTransition::Type | Type of transition we're currently playing | SLevelViewport.h | |
| WorldPartitionViewportWidget | TSharedPtr< SWorldPartitionViewportWidget > | SLevelViewport.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddOverlayWidget
(
TSharedRef< SWidget > OverlaidWidget, |
SLevelViewport.h | ||
virtual TSharedRef< SWidget > AsWidget () |
SLevelViewport.h | ||
virtual TSharedRef< const SWidget > AsWidget () |
SLevelViewport.h | ||
bool CanMaximize() |
SLevelViewport.h | ||
bool CanToggleGameView() |
SLevelViewport.h | ||
virtual bool CanToggleInViewportContextMenu() |
SLevelViewport.h | ||
void Construct
(
const FArguments& InArgs, |
Constructs the viewport widget | SLevelViewport.h | |
void ConstructLevelEditorViewportClient
(
FLevelEditorViewportInstanceSettings& ViewportInstanceSettings |
Constructs the level editor viewport client | SLevelViewport.h | |
void ConstructViewportOverlayContent() |
Constructs the widgets for the viewport overlay | SLevelViewport.h | |
TSharedRef< class ISceneOutlinerColumn > CreateActorLockSceneOutlinerColumn
(
ISceneOutliner& SceneOutliner |
SLevelViewport.h | ||
virtual void EndPlayInEditorSession() |
SLevelViewport.h | ||
virtual FViewport * GetActiveViewport() |
SLevelViewport.h | ||
bool GetAllowsCinematicControl() |
SLevelViewport.h | ||
virtual FEditorViewportClient & GetAssetViewportClient() |
SLevelViewport.h | ||
EVisibility GetCloseImmersiveButtonVisibility () |
Called to get the visibility of the viewport's 'Restore from Immersive' button. | SLevelViewport.h | |
const TSharedPtr< FUICommandList > & GetCommandList() |
SLevelViewport.h | ||
FName GetConfigKey () |
Returns the config key associated with this viewport. | SLevelViewport.h | |
FMargin GetContextMenuPadding() |
SLevelViewport.h | ||
virtual EVisibility GetCurrentLevelButtonVisibility() |
SLevelViewport.h | ||
virtual EVisibility GetCurrentLevelTextVisibility() |
SLevelViewport.h | ||
FText GetCurrentScreenPercentageText() |
Called to get the screen percentage preview text | SLevelViewport.h | |
EVisibility GetCurrentScreenPercentageVisibility() |
SLevelViewport.h | ||
FString GetDeviceProfileString() |
SLevelViewport.h | ||
EVisibility GetFullToolbarVisibility() |
Get the visibility for items considered to be part of the 'full' viewport toolbar | SLevelViewport.h | |
const FLevelEditorViewportClient & GetLevelViewportClient () |
SLevelViewport.h | ||
FLevelEditorViewportClient & GetLevelViewportClient () |
SLevelViewport.h | ||
EVisibility GetMaximizeToggleVisibility () |
Called to get the visibility of the viewport's maximize/minimize toggle button. | SLevelViewport.h | |
EVisibility GetOptionsMenuVisibility() |
Get the visibility for viewport toolbar's options menu. | SLevelViewport.h | |
TWeakPtr< ILevelEditor > GetParentLevelEditor() |
Get the parent level editor for this viewport | SLevelViewport.h | |
UGameViewportClient * GetPlayClient() |
SLevelViewport.h | ||
FText GetSelectedActorsCurrentLevelText
(
bool bDrawOnlyLabel |
Called to get the text for the level the currently selected actor or actors are in. | SLevelViewport.h | |
virtual EVisibility GetSelectedActorsCurrentLevelTextVisibility() |
SLevelViewport.h | ||
TSharedPtr< FSceneViewport > GetSharedActiveViewport() |
SLevelViewport.h | ||
EVisibility GetToolbarVisibility() |
SLevelViewport.h | ||
virtual EVisibility GetToolBarVisibility() |
Called to get the visibility of the level viewport toolbar | SLevelViewport.h | |
virtual EVisibility GetTransformToolbarVisibility() |
SLevelViewport.h | ||
virtual EVisibility GetViewportControlsVisibility() |
SLevelViewport.h | ||
FName GetViewportTypeWithinLayout() |
Get this level viewport widget's type within its parent layout | SLevelViewport.h | |
virtual TWeakPtr< SViewport > GetViewportWidget() |
SLevelViewport.h | ||
virtual UWorld * GetWorld() |
SLevelViewport.h | ||
virtual bool HasPlayInEditorViewport() |
SLevelViewport.h | ||
virtual void HideInViewportContextMenu() |
SLevelViewport.h | ||
bool IsActorAlwaysPreview
(
TWeakObjectPtr< AActor > Actor |
For the specified actor, See if we're forcing a preview | SLevelViewport.h | |
virtual bool IsActorEditorContextVisible() |
SLevelViewport.h | ||
bool IsActorLocked
(
const TWeakObjectPtr< AActor > Actor |
SLevelViewport.h | ||
bool IsActorPreviewDetached
(
TWeakObjectPtr< AActor > PreviewActor |
See if the specified actor's ActorPreview is detached from actor | SLevelViewport.h | |
bool IsActorPreviewPinned
(
TWeakObjectPtr< AActor > PreviewActor |
See if the specified actor's ActorPreview is pinned or not | SLevelViewport.h | |
bool IsAnyActorLocked() |
SLevelViewport.h | ||
bool IsDeviceProfileStringSet
(
FString ProfileName |
SLevelViewport.h | ||
bool IsFoliageTypeVisible
(
TWeakObjectPtr< class UFoliageType > FoliageType |
Checks if a foliage type is visible in this viewport | SLevelViewport.h | |
bool IsImmersive() |
SLevelViewport.h | ||
bool IsInForegroundTab() |
SLevelViewport.h | ||
bool IsInGameView() |
SLevelViewport.h | ||
bool IsLayerVisible
(
FName LayerName |
Checks if a layer is visible in this viewportCalled to determine if a layer is visible. | SLevelViewport.h | |
bool IsLockedCameraViewEnabled() |
Check whether locked camera view is enabled | SLevelViewport.h | |
bool IsMaximized() |
SLevelViewport.h | ||
bool IsPlayInEditorViewportActive() |
SLevelViewport.h | ||
bool IsSelectedActorLocked() |
SLevelViewport.h | ||
bool IsViewportConfigurationSet
(
FName ConfigurationName |
Returns whether the named layout is currently selected on the parent tab that this viewport belongs to. | SLevelViewport.h | |
bool IsViewportToolbarVisible() |
Whether the viewport toolbar is currently visible. | SLevelViewport.h | |
bool IsViewportTypeWithinLayoutEqual
(
FName InLayoutType |
Checks if the specified layout type matches our current viewport type. | SLevelViewport.h | |
virtual bool IsVisible() |
SLevelViewport.h | ||
void MakeImmersive
(
const bool bWantImmersive, |
Attempts to switch this viewport into immersive mode | SLevelViewport.h | |
void MakeMaximized
(
bool bWantMaximized, |
Attempt to switch this viewport into a maximized or normal mode | SLevelViewport.h | |
void OnActorLockToggleFromMenu () |
Called to unlock the actor from the viewport's context menu | SLevelViewport.h | |
void OnActorLockToggleFromMenu
(
AActor* Actor |
Called to lock/unlock the actor from the viewport's context menu | SLevelViewport.h | |
void OnActorSelectionChanged
(
const TArray< UObject* >& NewSelection, |
Called on all viewports, when actor selection changes. | SLevelViewport.h | |
void OnClearAllBookmarks() |
Called to clear all bookmarks | SLevelViewport.h | |
void OnClearBookmark
(
int32 BookmarkIndex |
Called to clear a bookmark | SLevelViewport.h | |
void OnCompactBookmarks() |
Called to Compact Bookmarks. | SLevelViewport.h | |
void OnElementSelectionChanged
(
const UTypedElementSelectionSet* SelectionSet, |
Called on all viewports, when element selection changes. | SLevelViewport.h | |
void OnFloatingButtonClicked() |
Actions to perform whenever the viewports floating buttons are pressed | SLevelViewport.h | |
virtual FReply OnFocusReceived
(
const FGeometry& MyGeometry, |
SLevelViewport.h | ||
virtual void OnFocusViewportToSelection() |
SEditorViewport Interface | SLevelViewport.h | |
bool OnHasBookmarkSet
(
int32 BookmarkIndex |
Called to check if a bookmark is set | SLevelViewport.h | |
void OnJumpToBookmark
(
int32 BookmarkIndex |
Called to jump to a bookmark | SLevelViewport.h | |
void OnPreviewSelectedCamerasChange() |
Called when Preview Selected Cameras preference is changed. | SLevelViewport.h | |
void OnSetBookmark
(
int32 BookmarkIndex |
Called to set a bookmark | SLevelViewport.h | |
void OnSetViewportConfiguration
(
FName ConfigurationName |
Sets the current layout on the parent tab that this viewport belongs to. | SLevelViewport.h | |
virtual void OnSimulateSessionFinished() |
SLevelViewport.h | ||
virtual void OnSimulateSessionStarted() |
SLevelViewport.h | ||
FReply OnToggleMaximize() |
Called when the maximize command is executed | SLevelViewport.h | |
virtual void RegisterGameViewportIfPIE() |
Registers a game viewport with the Slate application so that specific messages can be routed directly to this level viewport if it is an active PIE viewport | SLevelViewport.h | |
void RemoveAllPreviews
(
const bool bRemoveFromDesktopViewport |
Unpin and close all actor preview windows | SLevelViewport.h | |
virtual void RemoveOverlayWidget
(
TSharedRef< SWidget > OverlaidWidget |
SLevelViewport.h | ||
void SaveConfig
(
const FString& ConfigName |
Saves this viewport's config to ULevelEditorViewportSettings | SLevelViewport.h | |
void SetActorAlwaysPreview
(
TWeakObjectPtr< AActor > PreviewActor, |
For the specified actor, toggle Pinned/Unpinned of it's ActorPreview | SLevelViewport.h | |
void SetAllowsCinematicControl
(
bool bAllow |
Sets whether the viewport should allow cinematic control | SLevelViewport.h | |
void SetDeviceProfileString
(
const FString& ProfileName |
Set the device profile name | SLevelViewport.h | |
void SetKeyboardFocusToThisViewport() |
Sets Slate keyboard focus to this viewport | SLevelViewport.h | |
void SetViewportTypeWithinLayout
(
FName InLayoutType |
Set this level viewport widget's type within its parent layout | SLevelViewport.h | |
virtual void StartPlayInEditorSession
(
UGameViewportClient* PlayClient, |
IAssetViewport Interface | SLevelViewport.h | |
virtual void SwapViewportsForPlayInEditor() |
SLevelViewport.h | ||
virtual void SwapViewportsForSimulateInEditor() |
SLevelViewport.h | ||
void ToggleActorPilotCameraView() |
Toggles enabling the exact camera view when locking a viewport to a camera | SLevelViewport.h | |
void ToggleActorPreviewIsPanelDetached
(
TWeakObjectPtr< AActor > PreviewActor |
For the specified actor, toggle whether the panel is detached from it | SLevelViewport.h | |
void ToggleActorPreviewIsPinned
(
TWeakObjectPtr< AActor > PreviewActor |
For the specified actor, toggle Pinned/Unpinned of it's ActorPreview | SLevelViewport.h | |
void ToggleAllFoliageTypes
(
bool bVisible |
Toggles all foliage types visibility | SLevelViewport.h | |
void ToggleGameView() |
Called when game view should be toggled | SLevelViewport.h | |
virtual void ToggleInViewportContextMenu() |
SLevelViewport.h | ||
void ToggleShowFoliageType
(
TWeakObjectPtr< class UFoliageType > FoliageType |
Toggles foliage type visibility in this viewport | SLevelViewport.h | |
void ToggleShowLayer
(
FName LayerName |
Toggles layer visibility in this viewport | SLevelViewport.h | |
void ToggleViewportToolbarVisibility() |
Toggles the current viewport toolbar visibility. | SLevelViewport.h | |
void ToggleViewportTypeActivationWithinLayout
(
FName InLayoutType |
Activates the specified viewport type in the layout, if it's not already, or reverts to default if it is. | SLevelViewport.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BindCommands() |
SLevelViewport.h | ||
TSharedRef< SWidget > BuildPIEViewportToolbar() |
SLevelViewport.h | ||
virtual TSharedPtr< SWidget > BuildViewportToolbar() |
SLevelViewport.h | ||
virtual void ExtendToolbarContext
(
FToolMenuContext& InToolMenuContext |
Can be overriden by derived classes to add new context objects to the new toolbar | SLevelViewport.h | |
void LockActorInternal
(
AActor* NewActorToLock |
SLevelViewport.h | ||
virtual TSharedRef< FEditorViewportClient > MakeEditorViewportClient() |
SEditorViewport interface | SLevelViewport.h | |
virtual void OnDecrementPositionGridSize() |
SLevelViewport.h | ||
virtual void OnDecrementRotationGridSize() |
SLevelViewport.h | ||
virtual EVisibility OnGetFocusedViewportIndicatorVisibility() |
SLevelViewport.h | ||
virtual const FSlateBrush * OnGetViewportBorderBrush() |
SLevelViewport.h | ||
virtual FSlateColor OnGetViewportBorderColorAndOpacity() |
SLevelViewport.h | ||
virtual EVisibility OnGetViewportContentVisibility() |
SLevelViewport.h | ||
virtual void OnIncrementPositionGridSize() |
SLevelViewport.h | ||
virtual void OnIncrementRotationGridSize() |
SLevelViewport.h | ||
virtual FName RegisterViewportToolbar() |
Registers the viewport toolbar UToolMenu and returns its name. | SLevelViewport.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool CanGetCameraInformationFromActor
(
AActor* Actor |
SLevelViewport.h | ||
static void EnableInViewportMenu() |
SLevelViewport.h | ||
static float GetActorLockSceneOutlinerColumnWidth() |
SLevelViewport.h | ||
static bool GetCameraInformationFromActor
(
AActor* Actor, |
SLevelViewport.h |