Lyra.Settings.ApplyFrontEndPerformanceOptionsInPIE
Lyra.Settings.ApplyFrontEndPerformanceOptionsInPIE
#Overview
name: Lyra.Settings.ApplyFrontEndPerformanceOptionsInPIE
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Do we apply front-end specific performance options in PIE?
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Lyra.Settings.ApplyFrontEndPerformanceOptionsInPIE is to control whether front-end specific performance options are applied in Play-In-Editor (PIE) mode. This setting is part of the performance optimization system for the Lyra project in Unreal Engine 5.
This setting variable is primarily used in the Lyra game module, specifically in the settings and development subsystems. It’s referenced in LyraSettingsLocal.cpp and LyraPlatformEmulationSettings.h, indicating its relevance to both local settings and platform emulation settings.
The value of this variable is set through a console variable (CVar) system. It’s initialized to false by default, meaning front-end performance options are not applied in PIE by default.
This variable interacts closely with another variable named CVarApplyFrontEndPerformanceOptionsInPIE. They share the same value and are used interchangeably in the code.
Developers must be aware that this setting affects the behavior of the game in PIE mode. When enabled, it allows front-end specific performance optimizations to be applied even in the editor, which can be useful for testing but may not accurately represent the final build performance.
Best practices when using this variable include:
- Use it primarily for testing front-end performance in the editor.
- Be cautious when enabling it, as it may affect the accuracy of performance testing for the main game.
- Consider disabling it when doing final performance evaluations to ensure they match the built game experience.
Regarding the associated variable CVarApplyFrontEndPerformanceOptionsInPIE:
The purpose of CVarApplyFrontEndPerformanceOptionsInPIE is identical to Lyra.Settings.ApplyFrontEndPerformanceOptionsInPIE. It’s the console variable implementation of the same setting.
This variable is used in the Lyra game module, specifically in the settings subsystem. It’s primarily referenced in LyraSettingsLocal.cpp.
The value of this variable is set through the console variable system and can be changed at runtime.
It directly interacts with the ShouldUseFrontendPerformanceSettings function in ULyraSettingsLocal, determining whether front-end performance settings should be applied.
Developers should be aware that this variable can be changed at runtime through the console, which can be useful for quick testing but should be managed carefully in production builds.
Best practices for using this variable include:
- Use it for quick toggles of front-end performance settings during development and testing.
- Ensure it’s set to the desired value before packaging the game.
- Consider exposing it as a developer-only option if runtime switching is needed in builds.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Settings/LyraSettingsLocal.cpp:39
Scope: file
Source code excerpt:
ECVF_Default);
static TAutoConsoleVariable<bool> CVarApplyFrontEndPerformanceOptionsInPIE(TEXT("Lyra.Settings.ApplyFrontEndPerformanceOptionsInPIE"),
false,
TEXT("Do we apply front-end specific performance options in PIE?"),
ECVF_Default);
static TAutoConsoleVariable<bool> CVarApplyDeviceProfilesInPIE(TEXT("Lyra.Settings.ApplyDeviceProfilesInPIE"),
false,
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Development/LyraPlatformEmulationSettings.h:49
Scope (from outer to inner):
file
class class ULyraPlatformEmulationSettings : public UDeveloperSettingsBackedByCVars
Source code excerpt:
// Most engine performance/scalability settings they drive are global, so if one PIE window
// is in the front-end and the other is in-game one will win and the other gets stuck with those settings
UPROPERTY(EditAnywhere, config, Category=PlatformEmulation, meta=(ConsoleVariable="Lyra.Settings.ApplyFrontEndPerformanceOptionsInPIE"))
bool bApplyFrontEndPerformanceOptionsInPIE = false;
// Should we apply experience/platform emulated device profiles in PIE?
UPROPERTY(EditAnywhere, config, Category=PlatformEmulation, meta=(InlineEditConditionToggle, ConsoleVariable="Lyra.Settings.ApplyDeviceProfilesInPIE"))
bool bApplyDeviceProfilesInPIE = false;
#Associated Variable and Callsites
This variable is associated with another variable named CVarApplyFrontEndPerformanceOptionsInPIE
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Settings/LyraSettingsLocal.cpp:39
Scope: file
Source code excerpt:
ECVF_Default);
static TAutoConsoleVariable<bool> CVarApplyFrontEndPerformanceOptionsInPIE(TEXT("Lyra.Settings.ApplyFrontEndPerformanceOptionsInPIE"),
false,
TEXT("Do we apply front-end specific performance options in PIE?"),
ECVF_Default);
static TAutoConsoleVariable<bool> CVarApplyDeviceProfilesInPIE(TEXT("Lyra.Settings.ApplyDeviceProfilesInPIE"),
false,
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Settings/LyraSettingsLocal.cpp:548
Scope (from outer to inner):
file
function bool ULyraSettingsLocal::ShouldUseFrontendPerformanceSettings
Source code excerpt:
{
#if WITH_EDITOR
if (GIsEditor && !CVarApplyFrontEndPerformanceOptionsInPIE.GetValueOnGameThread())
{
return false;
}
#endif
return bInFrontEndForPerformancePurposes;