Lyra.DeviceProfile.Mobile.ResolutionQualityLimits

Lyra.DeviceProfile.Mobile.ResolutionQualityLimits

#Overview

name: Lyra.DeviceProfile.Mobile.ResolutionQualityLimits

The value of this variable can be defined or overridden in .ini config files. 6 .ini config files referencing this setting variable.

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

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of Lyra.DeviceProfile.Mobile.ResolutionQualityLimits is to set limits on resolution quality for mobile devices in the Lyra game project, based on the frame rate (FPS) of the game.

This setting variable is primarily used in the Lyra game project, specifically within the LyraGame module. It’s part of the game’s settings system, focusing on mobile device profiles and performance optimization.

The value of this variable is set as a console variable (CVar) in the Unreal Engine. It’s defined as a string that contains a list of FPS thresholds and their corresponding maximum resolution quality values.

This variable interacts closely with CVarMobileResolutionQualityLimits, which is the actual TAutoConsoleVariable that stores and manages the value. They essentially represent the same setting, with Lyra.DeviceProfile.Mobile.ResolutionQualityLimits being the name used to access it via console commands or configuration files.

Developers must be aware that this variable affects the game’s performance and visual quality on mobile devices. It’s crucial for balancing between visual fidelity and frame rate, especially on lower-end mobile hardware.

Best practices when using this variable include:

  1. Testing on a variety of mobile devices to ensure the limits are appropriate.
  2. Balancing the resolution quality limits with other performance-impacting settings.
  3. Considering user experience and preferences when setting these limits.

Regarding the associated variable CVarMobileResolutionQualityLimits:

The purpose of CVarMobileResolutionQualityLimits is to provide a programmatic interface for the Lyra.DeviceProfile.Mobile.ResolutionQualityLimits setting within the C++ code of the Lyra game project.

This variable is used directly in the LyraGame module, specifically in the LyraSettingsLocal.cpp file. It’s part of the game’s internal settings management system.

The value of CVarMobileResolutionQualityLimits is set when the console variable Lyra.DeviceProfile.Mobile.ResolutionQualityLimits is modified, either through console commands or configuration files.

It interacts with other parts of the settings system, particularly within the LyraSettingsHelpers namespace, where it’s used to create a TMobileQualityWrapper object for managing resolution quality limits.

Developers should be aware that modifying CVarMobileResolutionQualityLimits directly in code will affect the game’s resolution quality limits on mobile devices. It’s important to ensure that any changes are consistent with the overall performance and quality goals of the project.

Best practices for using CVarMobileResolutionQualityLimits include:

  1. Using it in conjunction with other mobile-specific settings for a cohesive mobile optimization strategy.
  2. Documenting any hard-coded changes to this variable to maintain consistency across the project.
  3. Consider exposing this setting through appropriate user interfaces for advanced users or debugging purposes.

#Setting Variables

#References In INI files

Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:262, section: [iPhoneX DeviceProfile]

Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:288, section: [iPadPro11 DeviceProfile]

Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:296, section: [iPadPro2_11 DeviceProfile]

Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:304, section: [iPadPro3_11 DeviceProfile]

Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:312, section: [iPadPro3_129 DeviceProfile]

Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:320, section: [iPadPro4_129 DeviceProfile]

#References in C++ code

#Callsites

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

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

Scope: file

Source code excerpt:


static TAutoConsoleVariable<FString> CVarMobileResolutionQualityLimits(
	TEXT("Lyra.DeviceProfile.Mobile.ResolutionQualityLimits"),
	TEXT(""),
	TEXT("List of limits on resolution quality of the form \"FPS:MaxResQuality,FPS2:MaxResQuality2,...\", kicking in when FPS is at or above the threshold"),
	ECVF_Default | ECVF_Preview);

static TAutoConsoleVariable<FString> CVarMobileResolutionQualityRecommendation(
	TEXT("Lyra.DeviceProfile.Mobile.ResolutionQualityRecommendation"),

#Associated Variable and Callsites

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

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

Scope: file

Source code excerpt:

	ECVF_Default | ECVF_Preview);

static TAutoConsoleVariable<FString> CVarMobileResolutionQualityLimits(
	TEXT("Lyra.DeviceProfile.Mobile.ResolutionQualityLimits"),
	TEXT(""),
	TEXT("List of limits on resolution quality of the form \"FPS:MaxResQuality,FPS2:MaxResQuality2,...\", kicking in when FPS is at or above the threshold"),
	ECVF_Default | ECVF_Preview);

static TAutoConsoleVariable<FString> CVarMobileResolutionQualityRecommendation(

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

Scope (from outer to inner):

file
namespace    LyraSettingsHelpers

Source code excerpt:


	TMobileQualityWrapper<int32> OverallQualityLimits(-1, CVarMobileQualityLimits);
	TMobileQualityWrapper<float> ResolutionQualityLimits(100.0f, CVarMobileResolutionQualityLimits);
	TMobileQualityWrapper<float> ResolutionQualityRecommendations(75.0f, CVarMobileResolutionQualityRecommendation);

	int32 GetApplicableOverallQualityLimit(int32 FrameRate)
	{
		return OverallQualityLimits.Query(FrameRate);
	}