AppliedTargetedHardwareClass

AppliedTargetedHardwareClass

#Overview

name: AppliedTargetedHardwareClass

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 AppliedTargetedHardwareClass is to store the successfully applied hardware class target for the Unreal Engine project. This variable is part of the hardware targeting system, which helps developers optimize their projects for specific hardware configurations.

The AppliedTargetedHardwareClass variable is primarily used in the HardwareTargeting module of Unreal Engine. This module is responsible for managing hardware-specific settings and optimizations.

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

AppliedTargetedHardwareClass interacts closely with the TargetedHardwareClass variable. While TargetedHardwareClass represents the desired hardware class, AppliedTargetedHardwareClass represents the actually applied hardware class. This distinction is important for tracking changes and determining if there are pending changes to be applied.

Developers must be aware that this variable is used to track the current state of applied hardware targeting settings. It should not be modified directly but rather updated through the proper channels in the HardwareTargeting module.

Best practices when using this variable include:

  1. Avoid modifying AppliedTargetedHardwareClass directly; instead, use the appropriate functions in the HardwareTargeting module to apply changes.
  2. Use this variable in conjunction with TargetedHardwareClass to determine if there are pending changes to the hardware targeting settings.
  3. When implementing features that depend on hardware targeting, check the AppliedTargetedHardwareClass to ensure you’re working with the current applied settings.
  4. Be aware that changes to this variable may trigger configuration updates and potentially impact performance settings across the project.

#Setting Variables

#References In INI files

Location: <Workspace>/Projects/Lyra/Config/DefaultEngine.ini:143, 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:286

Scope (from outer to inner):

file
function     void FHardwareTargetingModule::ApplyHardwareTargetingSettings

Source code excerpt:

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

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

Scope (from outer to inner):

file
function     UHardwareTargetingSettings::UHardwareTargetingSettings

Source code excerpt:

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


bool UHardwareTargetingSettings::HasPendingChanges() const

#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:51

Scope (from outer to inner):

file
class        class UHardwareTargetingSettings : public UObject

Source code excerpt:

	/** Enum that is set to TargetedHardwareClass when the settings have been successfully applied */
	UPROPERTY(config)
	EHardwareClass AppliedTargetedHardwareClass;

	/** Enum specifying a graphics preset to use for this game */
	UPROPERTY(config, EditAnywhere, category=None)
	EGraphicsPreset DefaultGraphicsPerformance;

	/** Enum that is set to DefaultGraphicsPerformance when the settings have been successfully applied */