PackageCompressionLevel_TestShipping
PackageCompressionLevel_TestShipping
#Overview
name: PackageCompressionLevel_TestShipping
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 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 PackageCompressionLevel_TestShipping is to set the compression level for package files in Unreal Engine 5 when building for Test and Shipping configurations. This setting variable is part of the project packaging system and is used to control the level of compression applied to game assets and packages during the build process.
This setting variable is primarily used by the Unreal Engine’s packaging and compression subsystems. It is referenced in the ProjectPackagingSettings class, which is part of the DeveloperToolSettings module. The TextureEditor module also uses this variable to determine the compression level for texture assets.
The value of this variable is typically set in the project’s configuration files, such as DefaultGame.ini. It can be modified through the Project Settings in the Unreal Editor, specifically under the Packaging category.
This variable interacts with other packaging-related variables, such as PackageCompressionLevel_Distribution and PackageCompressionLevel_DebugDevelopment. These variables work together to provide different compression levels for various build configurations.
Developers should be aware that this variable affects the build size and loading times of the game. A higher compression level will result in smaller package sizes but may increase build times and potentially impact runtime performance.
Best practices when using this variable include:
- Balancing compression level with build time and runtime performance requirements.
- Testing different compression levels to find the optimal setting for your project.
- Considering platform-specific requirements, as some platforms may have different compression needs or limitations.
- Coordinating with the team to ensure consistent use of compression settings across different build configurations.
- Documenting any changes to this setting and communicating them to the development team to maintain consistency in the build process.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseGame.ini:99, section: [/Script/UnrealEd.ProjectPackagingSettings]
- INI Section:
/Script/UnrealEd.ProjectPackagingSettings
- Raw value:
4
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultGame.ini:110, section: [/Script/UnrealEd.ProjectPackagingSettings]
- INI Section:
/Script/UnrealEd.ProjectPackagingSettings
- Raw value:
5
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Developer/DeveloperToolSettings/Classes/Settings/ProjectPackagingSettings.h:373
Scope (from outer to inner):
file
class class UProjectPackagingSettings : public UObject
Source code excerpt:
UPROPERTY(config, EditAnywhere, Category = Packaging, AdvancedDisplay, meta = (DisplayName = "Compressor Effort Level for Test & Shipping"))
int32 PackageCompressionLevel_TestShipping;
UPROPERTY(config, EditAnywhere, Category = Packaging, AdvancedDisplay, meta = (DisplayName = "Compressor Effort Level for Distribution"))
int32 PackageCompressionLevel_Distribution;
/**
* A generic setting which is used to determine whether it is worth using compression for a block of data when creating IoStore or .pak files.
#Loc: <Workspace>/Engine/Source/Editor/TextureEditor/Private/TextureEditorToolkit.cpp:3299
Scope (from outer to inner):
file
function void FTextureEditorToolkit::PackagingSettingsChanged
Source code excerpt:
else if (*Selection == TEXT("TestShipping"))
{
CompressionLevelFromSettings = ProjectSettings->PackageCompressionLevel_TestShipping;
}
else if (*Selection == TEXT("Distribution"))
{
CompressionLevelFromSettings = ProjectSettings->PackageCompressionLevel_Distribution;
}
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Compression/OodleDataCompressionFormat.cpp:44
Scope: file
Source code excerpt:
PackageCompressionMethod=Kraken
PackageCompressionLevel_Distribution=7
PackageCompressionLevel_TestShipping=5
PackageCompressionLevel_DebugDevelopment=4
* This can be set in DefaultGame.ini then overrides set up per-platform.
*
* The Engine also has a veto compressionformat set up in the DataDrivenPlatformInfo.ini for each platform in the field
* "HardwareCompressionFormat"
* eg. platforms that don't want any software compressor can set "HardwareCompressionFormat=None" and this will override what you
* set in "PackageCompressionFormat".
*
* The idea is in typical use, you set "PackageCompressionFormat" for your Game, and you get that compressor on most platforms, but on
* some platforms that don't want compression, it automatically turns off.
*
* If you want to force use of your Game.ini compressor (ignore the HardwareCompressionFormat) you can set bForceUseProjectCompressionFormat
* in ProjectPackagingSettings.
*
*
* ***************************/
#include "CoreMinimal.h"
#include "CoreTypes.h"
#include "Misc/Compression.h"
#include "Misc/ICompressionFormat.h"
#include "Misc/CommandLine.h"
#include "Misc/ConfigCacheIni.h"
#include "Misc/Parse.h"
/*
#if WITH_EDITOR
#include "Settings/ProjectPackagingSettings.h"
#endif
*/
#include "HAL/PlatformProcess.h"
#include "Compression/OodleDataCompression.h"
#include "oodle2.h"
#define OODLE_DERIVEDDATA_VER TEXT("BA7AA26CD1C3498787A3F3AA53895042")
// function pointer for old DLL import :
extern "C"
{
typedef OO_SINTa (OOLINK t_fp_OodleLZ_Compress)(OodleLZ_Compressor compressor,
const void * rawBuf,OO_SINTa rawLen,void * compBuf,
OodleLZ_CompressionLevel selection,
const OodleLZ_CompressOptions * pOptions,
const void * dictionaryBase,
const void * lrm);
typedef OO_SINTa (OOLINK t_fp_OodleSetAllocators)(
t_fp_OodleCore_Plugin_MallocAligned* fp_OodleMallocAligned,
t_fp_OodleCore_Plugin_Free* fp_OodleFree);
};
struct FOodleDataCompressionFormat : ICompressionFormat
{
#References in C# build files
This variable is referenced in the following C# build files:
Location: <Workspace>/Engine/Source/Programs/AutomationTool/Scripts/CopyBuildToStagingDirectory.Automation.cs:3043
else if (SC.StageTargetConfigurations.Any(Config => Config == UnrealTargetConfiguration.Test || Config == UnrealTargetConfiguration.Shipping))
{
PlatformGameConfig.GetInt32("/Script/UnrealEd.ProjectPackagingSettings", "PackageCompressionLevel_TestShipping", out CompressionLevel);
}
else
{
PlatformGameConfig.GetInt32("/Script/UnrealEd.ProjectPackagingSettings", "PackageCompressionLevel_DebugDevelopment", out CompressionLevel);
}