bIsFakePlatform

bIsFakePlatform

#Overview

name: bIsFakePlatform

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

It is referenced in 13 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bIsFakePlatform is to identify platforms that are not concrete or real platforms but are used for configuration grouping or other internal purposes within the Unreal Engine 5 system.

This setting variable is primarily used in the platform information and configuration subsystems of Unreal Engine 5. It is referenced in various modules including CommonUI, ScreenShotComparisonTools, TurnkeySupport, AutomationTest, Core, and DeveloperSettings.

The value of this variable is typically set in the platform configuration files and loaded through the DataDrivenPlatformInfoRegistry. It is set using the “bIsFakePlatform” key in the configuration files.

bIsFakePlatform often interacts with other platform-related variables such as bEnabledForUse, bIsConfidential, and various platform-specific settings.

Developers must be aware that platforms marked as fake are often excluded from various operations and UI elements throughout the engine. This includes platform selection for builds, screenshots, simulations, and other platform-specific features.

Best practices when using this variable include:

  1. Only mark platforms as fake if they are truly not meant to be used as actual build targets.
  2. Be aware that fake platforms will be filtered out in many platform-related operations and UI elements.
  3. Use fake platforms judiciously for configuration grouping or other internal purposes, but not for platforms that should be available to developers or end-users.
  4. When iterating through platform information, always check the bIsFakePlatform flag to ensure you’re only operating on real, usable platforms.
  5. Be cautious when changing the value of this variable for existing platforms, as it may have wide-ranging effects on how the platform is treated throughout the engine.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/Unix/DataDrivenPlatformInfo.ini:4, section: [DataDrivenPlatformInfo]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:8, section: [DataDrivenPlatformInfo]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Runtime/CommonUI/Source/CommonInput/Private/CommonInputBaseTypes.cpp:143

Scope (from outer to inner):

file
function     const TArray<FName>& UCommonInputBaseControllerData::GetRegisteredGamepads
lambda-function

Source code excerpt:

			// Don't add fake platforms that are used to group real platforms to make configuration for groups of platforms
			// simpler.
			if (PlatformInfo.bIsFakePlatform)
			{
				continue;
			}

			// If the platform uses the standard keyboard for default input, ignore it, all of those platforms will use "PC"
			// as their target, so Windows, Linux, but not Mac.

#Loc: <Workspace>/Engine/Plugins/Runtime/CommonUI/Source/CommonInput/Private/CommonInputBaseTypes.cpp:438

Scope (from outer to inner):

file
function     const TArray<FName>& FCommonInputPlatformBaseData::GetRegisteredPlatforms
lambda-function

Source code excerpt:

			// Don't add fake platforms that are used to group real platforms to make configuration for groups of platforms
			// simpler.
			if (PlatformInfo.bIsFakePlatform)
			{
				continue;
			}

			// If the platform uses the standard keyboard for default input, ignore it, all of those platforms will use "PC"
			// as their target, so Windows, Linux, but not Mac.

#Loc: <Workspace>/Engine/Source/Developer/ScreenShotComparisonTools/Private/ScreenshotComparisonSettings.cpp:54

Scope (from outer to inner):

file
function     const TSet<FScreenshotFallbackEntry>& UScreenShotComparisonSettings::GetAllPlatformSettings

Source code excerpt:

		for (const auto& Pair : FDataDrivenPlatformInfoRegistry::GetAllPlatformInfos())
		{
			if (Pair.Value.bIsFakePlatform || Pair.Value.bEnabledForUse == false)
			{
				continue;
			}

			FString PlatformName = Pair.Key.ToString();
			UScreenShotComparisonSettings* Settings (UScreenShotComparisonSettings::Create(PlatformName));

#Loc: <Workspace>/Engine/Source/Editor/TurnkeySupport/Private/TurnkeySupportModule.cpp:1777

Scope (from outer to inner):

file
function     void FTurnkeySupportModule::MakeQuickLaunchItems
lambda-function

Source code excerpt:

		for (const auto& Pair : FDataDrivenPlatformInfoRegistry::GetAllPlatformInfos())
		{
			if (Pair.Value.bIsFakePlatform)
			{
				continue;
			}

			FName PlatformName = Pair.Key;
			const FDataDrivenPlatformInfo& Info = Pair.Value;

#Loc: <Workspace>/Engine/Source/Editor/TurnkeySupport/Private/TurnkeySupportModule.cpp:2057

Scope (from outer to inner):

file
function     void FTurnkeySupportModule::MakeSimulatorItems
lambda-function

Source code excerpt:

		for (const auto& Pair : FDataDrivenPlatformInfoRegistry::GetAllPlatformInfos())
		{
			if (Pair.Value.bIsFakePlatform)
			{
				continue;
			}

			FName PlatformName = Pair.Key;
			const FDataDrivenPlatformInfo& Info = Pair.Value;

#Loc: <Workspace>/Engine/Source/Editor/TurnkeySupport/Private/TurnkeySupportModule.cpp:2133

Scope (from outer to inner):

file
function     TSharedRef<SWidget> FTurnkeySupportModule::MakeTurnkeyMenuWidget
lambda-function

Source code excerpt:

			for (const auto& Pair : FDataDrivenPlatformInfoRegistry::GetAllPlatformInfos())
			{
				if (Pair.Value.bIsFakePlatform || Pair.Value.bEnabledForUse == false)
				{
					continue;
				}

				FName PlatformName = Pair.Key;
				const FDataDrivenPlatformInfo& Info = Pair.Value;

#Loc: <Workspace>/Engine/Source/Editor/TurnkeySupport/Private/TurnkeySupportModule.cpp:2592

Scope (from outer to inner):

file
function     void FTurnkeySupportModule::UpdateSdkInfo
lambda-function
lambda-function

Source code excerpt:

				{
					// fake platforms won't come back, just skip it
					if (FDataDrivenPlatformInfoRegistry::GetPlatformInfo(It.Key).bIsFakePlatform)
					{
						It.Value.Status = ETurnkeyPlatformSdkStatus::Unknown;
					}
					else
					{
						It.Value.Status = ETurnkeyPlatformSdkStatus::Error;

#Loc: <Workspace>/Engine/Source/Editor/TurnkeySupport/Private/TurnkeySupportModule.cpp:2629

Scope (from outer to inner):

file
function     void FTurnkeySupportModule::UpdateSdkInfoForAllDevices

Source code excerpt:

		{
			FName PlatformName = Pair.Key;
			if (!Pair.Value.bIsFakePlatform && !FDataDrivenPlatformInfoRegistry::IsPlatformHiddenFromUI(PlatformName))
			{
				ITargetPlatform* TP = GetTargetPlatformManager()->FindTargetPlatform(PlatformName);
				if (TP == nullptr)
				{
					continue;
				}

#Loc: <Workspace>/Engine/Source/Runtime/AutomationTest/Private/AutomationTestPlatform.cpp:30

Scope (from outer to inner):

file
namespace    AutomationTestPlatform
function     const TSet<FName>& GetAllAvailablePlatformNames

Source code excerpt:

				}
				const FDataDrivenPlatformInfo& PlatformInfo = PlatformInfosMapItem.Value;
				if (PlatformInfo.bIsFakePlatform || (!PlatformInfo.bEnabledForUse))
				{
					continue;
				}
				NameSet.Add(TargetPlatformName);
			}
			NameSet.Sort([](const FName& A, const FName& B) { return A.ToString() < B.ToString(); });

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Misc/DataDrivenPlatformInfoRegistry.cpp:337

Scope (from outer to inner):

file
function     static void LoadDDPIIniSettings

Source code excerpt:


	DDPIGetBool(IniFile, TEXT("bIsConfidential"), Info.bIsConfidential);
	DDPIGetBool(IniFile, TEXT("bIsFakePlatform"), Info.bIsFakePlatform);
	DDPIGetString(IniFile, TEXT("TargetSettingsIniSectionName"), Info.TargetSettingsIniSectionName);
	DDPIGetString(IniFile, TEXT("HardwareCompressionFormat"), Info.HardwareCompressionFormat);
	DDPIGetStringArray(IniFile, TEXT("AdditionalRestrictedFolders"), Info.AdditionalRestrictedFolders);

	DDPIGetBool(IniFile, TEXT("Freezing_b32Bit"), Info.Freezing_b32Bit);
	DDPIGetUInt(IniFile, Info.Freezing_b32Bit ? TEXT("Freezing_MaxFieldAlignment32") : TEXT("Freezing_MaxFieldAlignment64"), Info.Freezing_MaxFieldAlignment);

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Misc/DataDrivenPlatformInfoRegistry.cpp:478

Scope (from outer to inner):

file
function     const TMap<FName, FDataDrivenPlatformInfo>& FDataDrivenPlatformInfoRegistry::GetAllPlatformInfos
lambda-function

Source code excerpt:

		SortedPlatformNames.RemoveAll([](FName Platform)
		{
			return DataDrivenPlatforms[Platform].bIsFakePlatform;
		});


		// now build list of values from the sort
		AllSortedPlatformInfos.AddZeroed(AllSortedPlatformNames.Num());
		for (int Index = 0; Index < AllSortedPlatformInfos.Num(); Index++)

#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/Misc/DataDrivenPlatformInfoRegistry.h:128

Scope: file

Source code excerpt:


	// some platforms are here just for IniParentChain needs and are not concrete platforms
	bool bIsFakePlatform = false;

	// the name of the ini section to use to load target platform settings (used at runtime and cooktime)
	FString TargetSettingsIniSectionName;

	// list of additional restricted folders
	TArray<FString> AdditionalRestrictedFolders;

#Loc: <Workspace>/Engine/Source/Runtime/DeveloperSettings/Private/Engine/PlatformSettingsManager.cpp:91

Scope (from outer to inner):

file
function     TArray<FName> UPlatformSettingsManager::GetKnownAndEnablePlatformIniNames

Source code excerpt:

#endif

		const bool bSupportedPlatform = !Info.bIsFakePlatform && bEnabledForUse && !bProjectDisabledPlatform;

		if (bSupportedPlatform)
		{
			Results.Add(PlatformName);
		}
	}