bOptimizeAnimBlueprintMemberVariableAccess
bOptimizeAnimBlueprintMemberVariableAccess
#Overview
name: bOptimizeAnimBlueprintMemberVariableAccess
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 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bOptimizeAnimBlueprintMemberVariableAccess is to control the optimization of member variable access in Animation Blueprints. It is primarily used for the animation system within Unreal Engine 5.
This setting variable is relied upon by the Animation Blueprint system, which is part of Unreal Engine’s animation module. It is also referenced in the Editor subsystem, specifically in the AnimGraph and UnrealEd modules.
The value of this variable is set in the UEngine constructor in GameEngine.cpp, where it is initialized to true. It can also be modified through the Engine’s configuration settings, as indicated by the UPROPERTY macro in the Engine.h file.
This variable interacts with other animation-related settings, such as bAllowMultiThreadedAnimationUpdate. When either of these variables is changed, it triggers a recompilation of all Animation Blueprints.
Developers must be aware that changing this variable will force all Animation Blueprints to be recompiled. This can have a significant impact on project compilation time and may affect runtime performance of animations.
Best practices when using this variable include:
- Carefully consider the performance implications before disabling this optimization.
- If disabled, thoroughly test the performance of animation-heavy scenes to ensure acceptable framerates.
- Be prepared for longer compilation times when changing this setting, especially in projects with many Animation Blueprints.
- Consider leaving this optimization enabled unless specific issues arise that require disabling it.
- If disabling this setting resolves an issue, report it to Epic Games as it may indicate a bug in the optimization process.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:283, section: [/Script/Engine.Engine]
- INI Section:
/Script/Engine.Engine
- 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/AnimGraph/Private/AnimBlueprintExtension_Base.cpp:1021
Scope (from outer to inner):
file
function void UAnimBlueprintExtension_Base::FEvaluationHandlerRecord::BuildFastPathCopyRecords
Source code excerpt:
};
if (GetDefault<UEngine>()->bOptimizeAnimBlueprintMemberVariableAccess)
{
for (TPair<FName, FAnimNodeSinglePropertyHandler>& ServicedPropPair : ServicedProperties)
{
TArray<FPropertyCopyRecord> AllAdditionalCopyRecords;
for (FPropertyCopyRecord& CopyRecord : ServicedPropPair.Value.CopyRecords)
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorEngine.cpp:2581
Scope (from outer to inner):
file
function void UEditorEngine::PostEditChangeProperty
Source code excerpt:
}
}
else if (PropertyName == GET_MEMBER_NAME_CHECKED(UEngine, bOptimizeAnimBlueprintMemberVariableAccess) ||
PropertyName == GET_MEMBER_NAME_CHECKED(UEngine, bAllowMultiThreadedAnimationUpdate))
{
FScopedSlowTask SlowTask(100, LOCTEXT("DirtyingAnimBlueprintsDueToOptimizationChange", "Invalidating All Anim Blueprints"));
// Flag all Blueprints as out of date (this doesn't dirty the package as needs saving but will force a recompile during PIE)
for (TObjectIterator<UAnimBlueprint> AnimBlueprintIt; AnimBlueprintIt; ++AnimBlueprintIt)
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Engine/Engine.h:1458
Scope (from outer to inner):
file
class class UEngine : public UObject , public FExec
Source code excerpt:
/** Controls whether anim blueprint nodes that access member variables of their class directly should use the optimized path that avoids a thunk to the Blueprint VM. This will force all anim blueprints to be recompiled. */
UPROPERTY(EditAnywhere, config, Category="Anim Blueprints")
uint32 bOptimizeAnimBlueprintMemberVariableAccess:1;
/** Controls whether by default we allow anim blueprint graph updates to be performed on non-game threads. This enables some extra checks in the anim blueprint compiler that will warn when unsafe operations are being attempted. This will force all anim blueprints to be recompiled. */
UPROPERTY(EditAnywhere, config, Category="Anim Blueprints")
uint32 bAllowMultiThreadedAnimationUpdate:1;
/** Controls whether cascade particle system LODs are updated in real time, or use the set value */
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/GameEngine.cpp:789
Scope (from outer to inner):
file
function UEngine::UEngine
Source code excerpt:
bCanBlueprintsTickByDefault = true;
bOptimizeAnimBlueprintMemberVariableAccess = true;
bAllowMultiThreadedAnimationUpdate = true;
bUseFixedFrameRate = false;
FixedFrameRate = 30.f;
bIsVanillaProduct = false;