Lyra.DeviceProfile.Mobile.MaxFrameRate
Lyra.DeviceProfile.Mobile.MaxFrameRate
#Overview
name: Lyra.DeviceProfile.Mobile.MaxFrameRate
The value of this variable can be defined or overridden in .ini config files. 12
.ini config files referencing this setting variable.
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Max FPS when being driven by device profile
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Lyra.DeviceProfile.Mobile.MaxFrameRate is to set the maximum frame rate for mobile devices in the Lyra game project. This setting is specifically designed for the performance management and device profiling system of Unreal Engine 5, focusing on mobile platforms.
This setting variable is primarily used in the Lyra game project, which is likely an example or template project for Unreal Engine 5. It’s utilized by the performance settings and local settings modules of the Lyra game.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 30 FPS, but can be changed at runtime or through configuration files.
The associated variable CVarDeviceProfileDrivenMobileMaxFrameRate directly interacts with Lyra.DeviceProfile.Mobile.MaxFrameRate. They share the same value and are used interchangeably in the code.
Developers must be aware that this setting is specific to mobile platforms and is used in conjunction with other frame rate limiting mechanisms. It’s not the sole determinant of the final frame rate, but rather a upper limit that works alongside other factors.
Best practices when using this variable include:
- Considering the target mobile devices’ capabilities when setting this value.
- Testing thoroughly with various settings to ensure smooth performance across different mobile devices.
- Using it in conjunction with other performance settings for a comprehensive approach to frame rate management.
Regarding the associated variable CVarDeviceProfileDrivenMobileMaxFrameRate:
The purpose of CVarDeviceProfileDrivenMobileMaxFrameRate is to provide a programmatic way to access and modify the maximum frame rate setting for mobile devices in the Lyra project.
This console variable is used in the LyraSettingsLocal class, specifically in the GetMaxMobileFrameRate() function. This suggests that it’s part of the settings management system of the Lyra game.
The value of this variable is set in the same way as Lyra.DeviceProfile.Mobile.MaxFrameRate, through the console variable system.
CVarDeviceProfileDrivenMobileMaxFrameRate directly interacts with Lyra.DeviceProfile.Mobile.MaxFrameRate, as they represent the same setting.
Developers should be aware that changes to this variable will affect the maximum frame rate for mobile devices in the game. It’s used in runtime checks to determine if a particular frame rate is supported.
Best practices for using this variable include:
- Using the provided getter function (GetMaxMobileFrameRate()) to access its value, rather than directly accessing the console variable.
- Considering this setting when implementing frame rate selection or limiting features.
- Ensuring that any changes to this variable are reflected in the game’s performance and user experience on mobile devices.
#Setting Variables
#References In INI files
Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:117, section: [IOS_Mid DeviceProfile]
- INI Section:
IOS_Mid DeviceProfile
- Raw value:
60
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:137, section: [IOS_High DeviceProfile]
- INI Section:
IOS_High DeviceProfile
- Raw value:
60
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:155, section: [IOS_Epic DeviceProfile]
- INI Section:
IOS_Epic DeviceProfile
- Raw value:
60
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:237, section: [iPhone8 DeviceProfile]
- INI Section:
iPhone8 DeviceProfile
- Raw value:
60
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:286, section: [iPadPro11 DeviceProfile]
- INI Section:
iPadPro11 DeviceProfile
- Raw value:
120
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:294, section: [iPadPro2_11 DeviceProfile]
- INI Section:
iPadPro2_11 DeviceProfile
- Raw value:
120
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:302, section: [iPadPro3_11 DeviceProfile]
- INI Section:
iPadPro3_11 DeviceProfile
- Raw value:
120
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:310, section: [iPadPro3_129 DeviceProfile]
- INI Section:
iPadPro3_129 DeviceProfile
- Raw value:
120
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:318, section: [iPadPro4_129 DeviceProfile]
- INI Section:
iPadPro4_129 DeviceProfile
- Raw value:
120
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:530, section: [Android_Mid DeviceProfile]
- INI Section:
Android_Mid DeviceProfile
- Raw value:
60
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:550, section: [Android_High DeviceProfile]
- INI Section:
Android_High DeviceProfile
- Raw value:
60
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:567, section: [Android_Epic DeviceProfile]
- INI Section:
Android_Epic DeviceProfile
- Raw value:
60
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Settings/LyraSettingsLocal.cpp:75
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarDeviceProfileDrivenMobileMaxFrameRate(
TEXT("Lyra.DeviceProfile.Mobile.MaxFrameRate"),
30,
TEXT("Max FPS when being driven by device profile"),
ECVF_Default | ECVF_Preview);
//////////////////////////////////////////////////////////////////////
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Performance/LyraPerformanceSettings.h:106
Scope (from outer to inner):
file
class class ULyraPlatformSpecificRenderingSettings : public UPlatformSettings
Source code excerpt:
// Potential frame rates to display for mobile
// Note: This is further limited by Lyra.DeviceProfile.Mobile.MaxFrameRate from the
// platform-specific device profile and what the platform frame pacer reports as supported
UPROPERTY(EditAnywhere, Config, Category=VideoSettings, meta=(EditCondition="FramePacingMode==ELyraFramePacingMode::MobileStyle", ForceUnits=Hz))
TArray<int32> MobileFrameRateLimits;
};
//////////////////////////////////////////////////////////////////////
#Associated Variable and Callsites
This variable is associated with another variable named CVarDeviceProfileDrivenMobileMaxFrameRate
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Settings/LyraSettingsLocal.cpp:74
Scope: file
Source code excerpt:
ECVF_Default | ECVF_Preview);
static TAutoConsoleVariable<int32> CVarDeviceProfileDrivenMobileMaxFrameRate(
TEXT("Lyra.DeviceProfile.Mobile.MaxFrameRate"),
30,
TEXT("Max FPS when being driven by device profile"),
ECVF_Default | ECVF_Preview);
//////////////////////////////////////////////////////////////////////
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Settings/LyraSettingsLocal.cpp:660
Scope (from outer to inner):
file
function int32 ULyraSettingsLocal::GetMaxMobileFrameRate
Source code excerpt:
int32 ULyraSettingsLocal::GetMaxMobileFrameRate()
{
return CVarDeviceProfileDrivenMobileMaxFrameRate.GetValueOnGameThread();
}
bool ULyraSettingsLocal::IsSupportedMobileFramePace(int32 TestFPS)
{
const bool bIsDefault = (TestFPS == GetDefaultMobileFrameRate());
const bool bDoesNotExceedLimit = (TestFPS <= GetMaxMobileFrameRate());