Lyra.Settings.ApplyFrameRateSettingsInPIE

Lyra.Settings.ApplyFrameRateSettingsInPIE

#Overview

name: Lyra.Settings.ApplyFrameRateSettingsInPIE

This variable is created as a Console Variable (cvar).

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of Lyra.Settings.ApplyFrameRateSettingsInPIE is to control whether frame rate settings should be applied in Play-In-Editor (PIE) mode within the Unreal Engine editor environment.

This setting variable is primarily used in the Lyra game project, which appears to be a sample or template project for Unreal Engine 5. It is part of the game’s settings and development tools, specifically related to platform emulation and performance optimization.

Based on the callsites, this variable is utilized in the following Unreal Engine subsystems and modules:

  1. LyraGame module, particularly in the settings and development-related classes.
  2. The Platform Emulation system, which allows developers to simulate different platform environments within the editor.

The value of this variable is set in two ways:

  1. As a console variable (CVar) in the C++ code, initialized to false.
  2. As a configurable property in the ULyraPlatformEmulationSettings class, which can be edited in the project settings.

This variable interacts with the associated variable CVarApplyFrameRateSettingsInPIE, which is the actual console variable implementation. They share the same value and purpose.

Developers must be aware of the following when using this variable:

  1. It only affects behavior in the editor environment, specifically in PIE mode.
  2. Changing this setting may impact the accuracy of platform-specific frame rate behavior testing in the editor.
  3. It’s part of a broader platform emulation system, so it should be considered alongside other emulation settings.

Best practices when using this variable include:

  1. Enable it when you need to test frame rate limits and behaviors specific to the target platform within the editor.
  2. Disable it when you want to maintain standard editor performance, regardless of the game’s frame rate settings.
  3. Use it in conjunction with other platform emulation settings for a more comprehensive testing environment.
  4. Be aware that enabling this might affect editor performance, as it applies game-specific frame rate limits in PIE.

Regarding the associated variable CVarApplyFrameRateSettingsInPIE:

This is the actual console variable implementation of the setting. It’s used directly in the C++ code to check whether frame rate settings should be applied in PIE mode. The purpose and usage are identical to Lyra.Settings.ApplyFrameRateSettingsInPIE, but it’s the low-level implementation that the engine code interacts with directly. Developers can modify this variable through console commands or the project settings UI, which will update the ULyraPlatformEmulationSettings property.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Settings/LyraSettingsLocal.cpp:34

Scope: file

Source code excerpt:


#if WITH_EDITOR
static TAutoConsoleVariable<bool> CVarApplyFrameRateSettingsInPIE(TEXT("Lyra.Settings.ApplyFrameRateSettingsInPIE"),
	false,
	TEXT("Should we apply frame rate settings in PIE?"),
	ECVF_Default);

static TAutoConsoleVariable<bool> CVarApplyFrontEndPerformanceOptionsInPIE(TEXT("Lyra.Settings.ApplyFrontEndPerformanceOptionsInPIE"),
	false,

#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Development/LyraPlatformEmulationSettings.h:43

Scope (from outer to inner):

file
class        class ULyraPlatformEmulationSettings : public UDeveloperSettingsBackedByCVars

Source code excerpt:

	// (frame rate limits are an engine-wide setting so it's not always desirable to have enabled in the editor)
	// You may also want to disable the editor preference "Use Less CPU when in Background" if testing background frame rate limits
	UPROPERTY(EditAnywhere, config, Category=PlatformEmulation, meta=(ConsoleVariable="Lyra.Settings.ApplyFrameRateSettingsInPIE"))
	bool bApplyFrameRateSettingsInPIE = false;

	// Do we apply front-end specific performance options in PIE?
	// 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"))

#Associated Variable and Callsites

This variable is associated with another variable named CVarApplyFrameRateSettingsInPIE. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Settings/LyraSettingsLocal.cpp:34

Scope: file

Source code excerpt:


#if WITH_EDITOR
static TAutoConsoleVariable<bool> CVarApplyFrameRateSettingsInPIE(TEXT("Lyra.Settings.ApplyFrameRateSettingsInPIE"),
	false,
	TEXT("Should we apply frame rate settings in PIE?"),
	ECVF_Default);

static TAutoConsoleVariable<bool> CVarApplyFrontEndPerformanceOptionsInPIE(TEXT("Lyra.Settings.ApplyFrontEndPerformanceOptionsInPIE"),
	false,

#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Settings/LyraSettingsLocal.cpp:449

Scope (from outer to inner):

file
function     float ULyraSettingsLocal::GetEffectiveFrameRateLimit

Source code excerpt:


#if WITH_EDITOR
	if (GIsEditor && !CVarApplyFrameRateSettingsInPIE.GetValueOnGameThread())
	{
		return Super::GetEffectiveFrameRateLimit();
	}
#endif

	if (PlatformSettings->FramePacingMode == ELyraFramePacingMode::ConsoleStyle)