bDeferDependencyLoads
bDeferDependencyLoads
#Overview
name: bDeferDependencyLoads
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 bDeferDependencyLoads is to control the deferral of dependency loads in the Blueprint system, specifically to manage circular dependencies during the loading process of Blueprint classes and structures.
This setting variable is primarily used by the CoreUObject module of Unreal Engine, particularly in the Blueprint support system and the linker loading process. The main subsystems that rely on this variable are the Blueprint loading system and the object linker system.
The value of this variable is set in the engine configuration file (GEngineIni) under the “Kismet” section. It can be accessed and modified through the FBoolConfigValueHelper class.
This variable interacts with other configuration variables, such as “bForceDisableCookedDependencyDeferring”, which can override the deferral behavior for cooked builds.
Developers must be aware that this variable affects the loading order of Blueprint classes and structures. When enabled, it helps prevent circular dependency issues by deferring the loading of external dependencies that might rely on the currently loading Blueprint class or structure.
Best practices when using this variable include:
- Carefully consider the implications of enabling or disabling this feature, as it can affect the loading performance and behavior of Blueprint-heavy projects.
- Be mindful of potential circular dependencies in your Blueprint architecture, as this setting is designed to mitigate issues arising from such dependencies.
- When working with cooked builds, consider the interaction with the “bForceDisableCookedDependencyDeferring” setting to ensure the desired behavior in packaged games.
- Monitor the loading performance of your project when modifying this setting, as deferring dependency loads can impact overall load times.
- Use this setting in conjunction with other Blueprint optimization techniques to ensure efficient loading and execution of Blueprint-based systems in your project.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:2047, section: [Kismet]
- INI Section:
Kismet
- 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/CoreUObject/Private/Blueprint/BlueprintSupport.cpp:93
Scope (from outer to inner):
file
function bool FBlueprintSupport::UseDeferredDependencyLoading
Source code excerpt:
{
#if USE_CIRCULAR_DEPENDENCY_LOAD_DEFERRING
static const FBoolConfigValueHelper DeferDependencyLoads(TEXT("Kismet"), TEXT("bDeferDependencyLoads"), GEngineIni);
bool bUseDeferredDependencyLoading = DeferDependencyLoads;
if (FPlatformProperties::RequiresCookedData())
{
static const FBoolConfigValueHelper DisableCookedBuildDefering(TEXT("Kismet"), TEXT("bForceDisableCookedDependencyDeferring"), GEngineIni);
bUseDeferredDependencyLoading &= !((bool)DisableCookedBuildDefering);
#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/UObject/LinkerLoad.cpp:4521
Scope (from outer to inner):
file
function void FLinkerLoad::Preload
Source code excerpt:
// to avoid cyclic dependency issues, we want to defer all external loads
// that MAY rely on this class/struct (meaning all other blueprint packages)
bool const bDeferDependencyLoads = (bIsBlueprintClass || bIsBlueprintStruct) && FBlueprintSupport::UseDeferredDependencyLoading();
#if USE_DEFERRED_DEPENDENCY_CHECK_VERIFICATION_TESTS
// we should NEVER be pre-loading another blueprint class when the
// DeferDependencyLoads flag is set (some other blueprint class/struct is
// already being loaded further up the load chain, and this could introduce
// a circular load)
#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/UObject/LinkerLoad.cpp:4565
Scope (from outer to inner):
file
function void FLinkerLoad::Preload
Source code excerpt:
#if USE_CIRCULAR_DEPENDENCY_LOAD_DEFERRING
TGuardValue<uint32> LoadFlagsGuard(LoadFlags, LoadFlags);
if (bDeferDependencyLoads)
{
LoadFlags |= LOAD_DeferDependencyLoads;
}
#endif // USE_CIRCULAR_DEPENDENCY_LOAD_DEFERRING
// make sure this object didn't get loaded in the above Preload call