bPersistentUberGraphFrame
bPersistentUberGraphFrame
#Overview
name: bPersistentUberGraphFrame
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 bPersistentUberGraphFrame is to control whether Unreal Engine uses a persistent UberGraphFrame for Blueprint-generated classes. This setting is primarily related to the Blueprint compilation and execution system.
The Unreal Engine subsystems that rely on this setting variable are primarily the Kismet compiler and the Blueprint runtime system. Based on the callsites, it’s used in the KismetCompiler module and the Engine module.
The value of this variable is set in the engine configuration file (GEngineIni). It’s read using the FBoolConfigValueHelper class, which suggests it’s a boolean value that can be configured externally.
This variable interacts with other parts of the Blueprint compilation process, particularly in the creation of local variables for functions and the handling of event graph locals.
Developers must be aware that this setting affects how Blueprint-generated classes handle their UberGraphFrame. When enabled, it creates a persistent frame that can improve performance in some scenarios but may increase memory usage.
Best practices when using this variable include:
- Consider the trade-offs between performance and memory usage when enabling or disabling this feature.
- Be consistent in its usage across a project to avoid unexpected behavior.
- If modifying this setting, thoroughly test Blueprint functionality, especially in complex graphs or those with many local variables.
- Be aware that changing this setting may require recompilation of Blueprints to take effect.
- Consider the impact on serialization and networking when enabling or disabling this feature, as it may affect how Blueprint state is saved and replicated.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:2040, 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/Editor/KismetCompiler/Private/KismetCompiler.cpp:1618
Scope (from outer to inner):
file
function void FKismetCompilerContext::CreateLocalVariablesForFunction
Source code excerpt:
ensure(!Context.IsEventGraph() || !Context.Locals.Num() || !UsePersistentUberGraphFrame());
const bool bPersistentUberGraphFrame = UsePersistentUberGraphFrame() && Context.bIsUbergraph;
// Local stack frame (or maybe class for the ubergraph)
{
const bool bArePropertiesLocal = true;
CreatePropertiesFromList(Context.Function, FunctionPropertyStorageLocation, Context.Locals, CPF_None, bArePropertiesLocal, /*bPropertiesAreParameters=*/ true);
if (bPersistentUberGraphFrame)
{
CreatePropertiesFromList(Context.Function, FunctionPropertyStorageLocation, Context.EventGraphLocals, CPF_None, bArePropertiesLocal, true);
}
// Create debug data for variable reads/writes
if (Context.bCreateDebugData)
#Loc: <Workspace>/Engine/Source/Editor/KismetCompiler/Private/KismetCompiler.cpp:1681
Scope (from outer to inner):
file
function void FKismetCompilerContext::CreateLocalVariablesForFunction
Source code excerpt:
const bool bArePropertiesLocal = false;
const EPropertyFlags UbergraphHiddenVarFlags = CPF_Transient | CPF_DuplicateTransient;
if (!bPersistentUberGraphFrame)
{
CreatePropertiesFromList(NewClass, ClassPropertyStorageLocation, Context.EventGraphLocals, UbergraphHiddenVarFlags, bArePropertiesLocal);
}
// Handle level actor references
const EPropertyFlags LevelActorReferenceVarFlags = CPF_None/*CPF_Edit*/;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/BlueprintGeneratedClass.cpp:2494
Scope (from outer to inner):
file
function bool UBlueprintGeneratedClass::UsePersistentUberGraphFrame
Source code excerpt:
bool UBlueprintGeneratedClass::UsePersistentUberGraphFrame()
{
static const FBoolConfigValueHelper PersistentUberGraphFrame(TEXT("Kismet"), TEXT("bPersistentUberGraphFrame"), GEngineIni);
return PersistentUberGraphFrame;
}
#if VALIDATE_UBER_GRAPH_PERSISTENT_FRAME
static TAtomic<int32> GUberGraphSerialNumber(0);