MatchProfile

MatchProfile

#Overview

name: MatchProfile

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

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of MatchProfile is to store an array of profile matching rules for Android device profile selection in Unreal Engine 5. This variable is used to determine the appropriate device profile for Android devices based on their hardware and software characteristics.

The MatchProfile variable is primarily used in the AndroidDeviceProfileSelector plugin, which is part of Unreal Engine’s runtime system for Android platforms. This plugin is responsible for selecting the most appropriate device profile for Android devices, which can significantly impact game performance and visual quality.

The value of this variable is set through the Unreal Engine editor, as indicated by the UPROPERTY macro with the EditAnywhere and config specifiers. This allows developers to define and modify the matching rules through the editor interface.

MatchProfile interacts with other variables and structures within the AndroidDeviceProfileSelector plugin, particularly the FProfileMatch and FProfileMatchItem structures. These structures define the individual matching rules and their criteria.

Developers must be aware that the order of profiles in the MatchProfile array is important, as the plugin will use the first matching profile it finds. Therefore, more specific or specialized profiles should be placed earlier in the array.

Best practices when using this variable include:

  1. Carefully defining and organizing matching rules to cover a wide range of Android devices.
  2. Regularly updating the profiles to account for new Android devices and hardware configurations.
  3. Testing the profile selection on various Android devices to ensure optimal performance and visual quality.
  4. Balancing the number of profiles to provide good device coverage without excessive complexity.
  5. Documenting the purpose and criteria for each profile to facilitate maintenance and collaboration.

By properly utilizing the MatchProfile variable, developers can ensure that their Unreal Engine 5 games provide the best possible experience across a diverse range of Android devices.

#Setting Variables

#References In INI files

<Workspace>/Engine/Config/BaseDeviceProfiles.ini:720, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:721, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:722, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:723, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:724, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:727, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:730, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:731, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:732, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:734, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:736, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:738, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:739, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:741, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:742, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:744, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:747, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:748, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:749, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:750, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:751, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:752, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:753, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:754, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:755, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:756, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:757, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:758, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:759, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:760, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]
<Workspace>/Engine/Config/BaseDeviceProfiles.ini:761, section: [/Script/AndroidDeviceProfileSelector.AndroidDeviceProfileMatchingRules]


... omitting 17 locations ...

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Runtime/AndroidDeviceProfileSelector/Source/AndroidDeviceProfileSelector/Private/AndroidDeviceProfileMatchingRules.h:88

Scope (from outer to inner):

file
class        class UAndroidDeviceProfileMatchingRules : public UObject

Source code excerpt:

	/** Array of rules to match */
	UPROPERTY(EditAnywhere, config, Category = "Matching Rules")
	TArray<FProfileMatch> MatchProfile;
};

#Loc: <Workspace>/Engine/Plugins/Runtime/AndroidDeviceProfileSelector/Source/AndroidDeviceProfileSelector/Private/AndroidDeviceProfileSelector.cpp:73

Scope (from outer to inner):

file
function     FString FAndroidDeviceProfileSelector::FindMatchingProfile

Source code excerpt:

	FString SM5Available		= SelectorProperties.FindChecked(FAndroidProfileSelectorSourceProperties::SRC_SM5Available);

	for (const FProfileMatch& Profile : GetAndroidDeviceProfileMatchingRules()->MatchProfile)
	{
		FString PreviousRegexMatch;
		bool bFoundMatch = true;
		for (const FProfileMatchItem& Item : Profile.Match)
		{
			FString ConfigRuleString;

#Loc: <Workspace>/Engine/Plugins/Runtime/AndroidDeviceProfileSelector/Source/AndroidDeviceProfileSelector/Private/AndroidDeviceProfileSelector.cpp:312

Scope (from outer to inner):

file
function     int32 FAndroidDeviceProfileSelector::GetNumProfiles

Source code excerpt:

int32 FAndroidDeviceProfileSelector::GetNumProfiles()
{
	return GetAndroidDeviceProfileMatchingRules()->MatchProfile.Num();
}