ShouldMinimizeEditorOnVRPIE
ShouldMinimizeEditorOnVRPIE
#Overview
name: ShouldMinimizeEditorOnVRPIE
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ShouldMinimizeEditorOnVRPIE is to control whether the Unreal Editor should be minimized when launching a VR Play-In-Editor (PIE) session. This setting is primarily used in the context of virtual reality development and testing within the Unreal Engine editor.
This setting variable is primarily used by the Unreal Engine’s editor subsystem, specifically in the Play-In-Editor functionality. It is referenced in the LevelEditorPlaySettings class and utilized in the PlayLevel and MovieSceneCaptureDialog modules.
The value of this variable is set in the LevelEditorPlaySettings class, which is a UObject-derived class that stores various configuration settings for the Play-In-Editor feature. It is defined as a UPROPERTY with the ‘config’ and ‘EditAnywhere’ specifiers, indicating that it can be modified through the editor’s project settings and saved in configuration files.
This variable interacts closely with another similar variable, bShouldMinimizeEditorOnNonVRPIE, which controls the same behavior for non-VR PIE sessions. Together, these variables provide fine-grained control over the editor’s behavior when launching different types of PIE sessions.
Developers should be aware that this setting can affect the workflow and user experience when testing VR content. When set to true, it helps to free up system resources by minimizing the editor, which can be beneficial for performance-intensive VR applications. However, it may also make it more challenging to quickly switch between the editor and the VR preview.
Best practices when using this variable include:
- Consider the target hardware and performance requirements of your VR application when deciding whether to enable this setting.
- Communicate the chosen setting to all team members to ensure a consistent development experience.
- Be mindful of how this setting might interact with other VR-related editor settings and tools.
- Regularly review and adjust this setting based on the project’s needs and the team’s workflow preferences.
- Use this in conjunction with other VR-specific editor settings to optimize the development process for VR content creation.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:232, section: [/Script/UnrealEd.LevelEditorPlaySettings]
- INI Section:
/Script/UnrealEd.LevelEditorPlaySettings
- Raw value:
True
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/MovieSceneCaptureDialog/Private/MovieSceneCaptureDialogModule.cpp:488
Scope (from outer to inner):
file
function void FInEditorCapture::OverridePlaySettings
Source code excerpt:
PlayInEditorSettings->ShowMouseControlLabel = false;
PlayInEditorSettings->ViewportGetsHMDControl = false;
PlayInEditorSettings->ShouldMinimizeEditorOnVRPIE = true;
PlayInEditorSettings->EnableGameSound = CaptureObject->AudioCaptureProtocolType != UNullAudioCaptureProtocol::StaticClass();
PlayInEditorSettings->bOnlyLoadVisibleLevelsInPIE = false;
PlayInEditorSettings->bPreferToStreamLevelsInPIE = false;
PlayInEditorSettings->PIEAlwaysOnTop = false;
PlayInEditorSettings->DisableStandaloneSound = false;
PlayInEditorSettings->AdditionalLaunchParameters = TEXT("");
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/LevelEditorPlaySettings.h:245
Scope (from outer to inner):
file
class class ULevelEditorPlaySettings : public UObject
Source code excerpt:
/** Should we minimize the editor when VR PIE is clicked (default = true) */
UPROPERTY(config, EditAnywhere, Category = PlayInEditor, meta = (ToolTip = "Whether or not the editor is minimized on VR PIE"))
bool ShouldMinimizeEditorOnVRPIE;
/** Should we minimize the editor when non-VR PIE is clicked (default = false) */
UPROPERTY(config, EditAnywhere, Category = PlayInEditor, meta = (ToolTip = "Whether or not the editor is minimized on non-VR PIE"))
bool bShouldMinimizeEditorOnNonVRPIE;
/** Whether we should emulate stereo (helps checking VR rendering issues). */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/PlayLevel.cpp:3361
Scope (from outer to inner):
file
function TSharedRef<SPIEViewport> UEditorEngine::GeneratePIEViewportWindow
Source code excerpt:
InViewportClient->SetGameLayerManager(GameLayerManagerRef);
const bool bShouldMinimizeRootWindowForVRPreview = bVRPreview && GEngine->XRSystem.IsValid() && InSessionParams.EditorPlaySettings->ShouldMinimizeEditorOnVRPIE;
const bool bShouldMinimizeRootWindowForNonVRPreview = !bVRPreview && InSessionParams.EditorPlaySettings->bShouldMinimizeEditorOnNonVRPIE;
// Set up a notification when the window is closed so we can clean up PIE
{
struct FLocal
{
static void RequestDestroyPIEWindowOverride(const TSharedRef<SWindow>& WindowBeingClosed, TWeakObjectPtr<UEditorEngine> OwningEditorEngine)