Freezing_bAlignBases
Freezing_bAlignBases
#Overview
name: Freezing_bAlignBases
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.
#Summary
#Usage in the C++ source code
The purpose of Freezing_bAlignBases is to control the alignment of base classes in memory layouts when freezing object structures for certain platforms in Unreal Engine 5.
This setting variable is primarily used in the Core module of Unreal Engine, specifically in the serialization and platform-specific data management systems. Based on the callsites, it’s utilized in the DataDrivenPlatformInfoRegistry and MemoryImage components.
The value of this variable is set through the DataDrivenPlatformInfo.ini file, as seen in the LoadDDPIIniSettings function in DataDrivenPlatformInfoRegistry.cpp. It’s read using the DDPIGetBool function, which suggests it’s a boolean value.
Freezing_bAlignBases interacts with other freezing-related variables such as Freezing_b32Bit and Freezing_MaxFieldAlignment. These variables collectively influence how memory layouts are constructed for different platforms.
Developers must be aware that this variable affects memory layout and serialization behavior, particularly when working with cross-platform development or when optimizing memory usage for specific platforms. Changing this value could potentially impact performance and compatibility across different builds of the engine.
Best practices when using this variable include:
- Ensuring consistency across all relevant platform configurations to avoid unexpected behavior.
- Testing thoroughly on all target platforms when modifying this setting, as it can affect memory layout and potentially introduce hard-to-detect bugs.
- Documenting any custom changes to this setting in project documentation to maintain clarity for all team members.
- Considering the implications on serialization and network replication when modifying this setting, especially for multiplayer games.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:9, section: [DataDrivenPlatformInfo]
- INI Section:
DataDrivenPlatformInfo
- Raw value:
true
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Misc/DataDrivenPlatformInfoRegistry.cpp:345
Scope (from outer to inner):
file
function static void LoadDDPIIniSettings
Source code excerpt:
DDPIGetUInt(IniFile, Info.Freezing_b32Bit ? TEXT("Freezing_MaxFieldAlignment32") : TEXT("Freezing_MaxFieldAlignment64"), Info.Freezing_MaxFieldAlignment);
DDPIGetBool(IniFile, TEXT("Freezing_bForce64BitMemoryImagePointers"), Info.Freezing_bForce64BitMemoryImagePointers);
DDPIGetBool(IniFile, TEXT("Freezing_bAlignBases"), Info.Freezing_bAlignBases);
DDPIGetGuid(IniFile, TEXT("GlobalIdentifier"), Info.GlobalIdentifier);
checkf(Info.GlobalIdentifier != FGuid(), TEXT("Platform %s didn't have a valid GlobalIdentifier set in DataDrivenPlatformInfo.ini"), *PlatformName.ToString());
// NOTE: add more settings here!
DDPIGetBool(IniFile, TEXT("bHasDedicatedGamepad"), Info.bHasDedicatedGamepad);
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Serialization/MemoryImage.cpp:66
Scope (from outer to inner):
file
function void FPlatformTypeLayoutParameters::InitializeForPlatform
Source code excerpt:
if (bHasEditorOnlyData) Flags |= Flag_WithEditorOnly;
if (PlatformInfo.Freezing_b32Bit) Flags |= Flag_Is32Bit;
if (PlatformInfo.Freezing_bAlignBases) Flags |= Flag_AlignBases;
MaxFieldAlignment = PlatformInfo.Freezing_MaxFieldAlignment;
}
void FPlatformTypeLayoutParameters::InitializeForCurrent()
{
#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/Misc/DataDrivenPlatformInfoRegistry.h:143
Scope: file
Source code excerpt:
bool Freezing_b32Bit = false;
bool Freezing_bForce64BitMemoryImagePointers = false;
bool Freezing_bAlignBases = false;
// True if this platform has a non-generic gamepad specifically associated with it
bool bHasDedicatedGamepad = false;
// True if this platform handles input via standard keyboard layout by default, translates to PC platform
bool bDefaultInputStandardKeyboard = false;