bMultiTargetFormat_DXT

bMultiTargetFormat_DXT

#Overview

name: bMultiTargetFormat_DXT

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 3 C++ source files. Also referenced in 1 C# build file meaning it may affect the build system logic.

#Summary

#Usage in the C++ source code

The purpose of bMultiTargetFormat_DXT is to control the inclusion of DXT textures when packaging with the Android (Multi) variant in Unreal Engine 5. This setting is specifically related to texture compression and packaging for Android devices.

This setting variable is part of the Android Runtime Settings module, which is responsible for configuring various aspects of Android game deployment. It is primarily used by the Android target platform subsystem.

The value of this variable is set in the Android Runtime Settings, which can be accessed through the project settings in the Unreal Engine editor. It is initialized to true by default in the constructor of the UAndroidRuntimeSettings class.

This variable interacts with other texture format variables, specifically bMultiTargetFormat_ETC2 and bMultiTargetFormat_ASTC. These variables work together to determine which texture formats are included in the Android (Multi) variant package.

Developers must be aware that this setting affects the size and compatibility of the game package. Including DXT textures can increase the package size but may provide better texture quality on some devices. However, not all Android devices support DXT textures, so it’s important to consider the target audience and device compatibility.

Best practices when using this variable include:

  1. Consider the target devices and their texture format support.
  2. Balance package size with texture quality requirements.
  3. Ensure at least one texture format is enabled among DXT, ETC2, and ASTC.
  4. Use in conjunction with the TextureFormatPriority_DXT variable to fine-tune texture format selection.
  5. Test the game on various Android devices to ensure optimal performance and visual quality.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:3066, section: [/Script/AndroidRuntimeSettings.AndroidRuntimeSettings]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Android/AndroidRuntimeSettings/Classes/AndroidRuntimeSettings.h:661

Scope (from outer to inner):

file
class        class UAndroidRuntimeSettings : public UObject

Source code excerpt:

	/** Include DXT textures when packaging with the Android (Multi) variant. */
	UPROPERTY(GlobalConfig, EditAnywhere, Category = MultiTextureFormats, meta = (DisplayName = "Include DXT textures"))
	bool bMultiTargetFormat_DXT;

	/** Include ASTC textures when packaging with the Android (Multi) variant. */
	UPROPERTY(GlobalConfig, EditAnywhere, Category = MultiTextureFormats, meta = (DisplayName = "Include ASTC textures"))
	bool bMultiTargetFormat_ASTC;

	/** Priority for the ETC2 texture format when launching on device or packaging using Android_Multi. The highest priority format supported by the device will be used. Default value is 0.2. */

#Loc: <Workspace>/Engine/Source/Runtime/Android/AndroidRuntimeSettings/Private/AndroidRuntimeSettings.cpp:40

Scope (from outer to inner):

file
function     UAndroidRuntimeSettings::UAndroidRuntimeSettings

Source code excerpt:

	, CompressionQualityModifier(1)
	, bMultiTargetFormat_ETC2(true)
	, bMultiTargetFormat_DXT(true)
	, bMultiTargetFormat_ASTC(true)
	, TextureFormatPriority_ETC2(0.2f)
	, TextureFormatPriority_DXT(0.6f)
	, TextureFormatPriority_ASTC(0.9f)
	, bStreamLandscapeMeshLODs(false)
{

#Loc: <Workspace>/Engine/Source/Runtime/Android/AndroidRuntimeSettings/Private/AndroidRuntimeSettings.cpp:212

Scope (from outer to inner):

file
function     void UAndroidRuntimeSettings::PostEditChangeProperty

Source code excerpt:


		// Ensure we have at least one format for Android_Multi
		if (!bMultiTargetFormat_ETC2 && !bMultiTargetFormat_DXT && !bMultiTargetFormat_ASTC)
		{
			bMultiTargetFormat_ETC2 = true;
			UpdateSinglePropertyInConfigFile(GetClass()->FindPropertyByName(GET_MEMBER_NAME_CHECKED(UAndroidRuntimeSettings, bMultiTargetFormat_ETC2)), GetDefaultConfigFilename());
		}

		// Notify the AndroidTargetPlatform module if it's loaded

#References in C# build files

This variable is referenced in the following C# build files:

Location: <Workspace>/Engine/Source/Programs/UnrealBuildTool/Platform/Android/UEDeployAndroid.cs:2742

						//need to check ini to determine which are supported
						Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bMultiTargetFormat_ETC2", out bETC2Enabled);
						Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bMultiTargetFormat_DXT", out bDXTEnabled);
						Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bMultiTargetFormat_ASTC", out bASTCEnabled);
						break;
					case "_ETC2":
						bETC2Enabled = true;
						break;
					case "_DXT":