AppliedDefaultGraphicsPerformance

AppliedDefaultGraphicsPerformance

#Overview

name: AppliedDefaultGraphicsPerformance

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 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of AppliedDefaultGraphicsPerformance is to store the applied graphics performance preset in the hardware targeting settings of Unreal Engine 5. This variable is part of the engine’s configuration system that allows developers to target specific hardware classes and set default graphics performance levels for their projects.

This setting variable is primarily used in the HardwareTargeting module, which is part of the Unreal Engine’s editor subsystem. It helps manage and apply hardware-specific configurations for different target platforms.

The value of this variable is set in the ApplyHardwareTargetingSettings() function of the FHardwareTargetingModule class. It is assigned the value of the DefaultGraphicsPerformance variable when the hardware targeting settings are applied.

AppliedDefaultGraphicsPerformance interacts closely with the DefaultGraphicsPerformance variable. While DefaultGraphicsPerformance represents the desired graphics preset, AppliedDefaultGraphicsPerformance stores the actually applied preset.

Developers should be aware that this variable is used to track whether changes have been applied to the graphics performance settings. The HasPendingChanges() function compares AppliedDefaultGraphicsPerformance with DefaultGraphicsPerformance to determine if there are unsaved changes.

Best practices when using this variable include:

  1. Not modifying it directly, but rather changing the DefaultGraphicsPerformance and letting the engine update AppliedDefaultGraphicsPerformance.
  2. Using it to check if the desired graphics settings have been successfully applied.
  3. Understanding that it’s part of the project’s configuration and will be saved to the config file when changes are applied.

#Setting Variables

#References In INI files

Location: <Workspace>/Projects/Lyra/Config/DefaultEngine.ini:145, section: [/Script/HardwareTargeting.HardwareTargetingSettings]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/HardwareTargeting/Private/HardwareTargetingModule.cpp:287

Scope (from outer to inner):

file
function     void FHardwareTargetingModule::ApplyHardwareTargetingSettings

Source code excerpt:

		{
			Settings->AppliedTargetedHardwareClass = Settings->TargetedHardwareClass;
			Settings->AppliedDefaultGraphicsPerformance = Settings->DefaultGraphicsPerformance;
			Settings->TryUpdateDefaultConfigFile();
		}
	}
}

TSharedRef<SWidget> FHardwareTargetingModule::MakeHardwareClassTargetCombo(FOnHardwareClassChanged OnChanged, TAttribute<EHardwareClass> SelectedEnum)

#Loc: <Workspace>/Engine/Source/Editor/HardwareTargeting/Private/HardwareTargetingSettings.cpp:8

Scope (from outer to inner):

file
function     UHardwareTargetingSettings::UHardwareTargetingSettings

Source code excerpt:

	, AppliedTargetedHardwareClass(EHardwareClass::Unspecified)
	, DefaultGraphicsPerformance(EGraphicsPreset::Unspecified)
	, AppliedDefaultGraphicsPerformance(EGraphicsPreset::Unspecified)
{ }


bool UHardwareTargetingSettings::HasPendingChanges() const
{
	if (TargetedHardwareClass == EHardwareClass::Unspecified || DefaultGraphicsPerformance == EGraphicsPreset::Unspecified)

#Loc: <Workspace>/Engine/Source/Editor/HardwareTargeting/Private/HardwareTargetingSettings.cpp:19

Scope (from outer to inner):

file
function     bool UHardwareTargetingSettings::HasPendingChanges

Source code excerpt:

	}

	return AppliedTargetedHardwareClass != TargetedHardwareClass || AppliedDefaultGraphicsPerformance != DefaultGraphicsPerformance;
}


void UHardwareTargetingSettings::PostEditChangeProperty( struct FPropertyChangedEvent& PropertyChangedEvent )
{
	SettingChangedEvent.Broadcast();

#Loc: <Workspace>/Engine/Source/Editor/HardwareTargeting/Public/HardwareTargetingSettings.h:59

Scope (from outer to inner):

file
class        class UHardwareTargetingSettings : public UObject

Source code excerpt:

	/** Enum that is set to DefaultGraphicsPerformance when the settings have been successfully applied */
	UPROPERTY(config)
	EGraphicsPreset AppliedDefaultGraphicsPerformance;

	/** Check if these settings have any pending changes that require action */
	bool HasPendingChanges() const;

#if WITH_EDITOR
public: