bp.DisableSearchDataUpdateOnSave
bp.DisableSearchDataUpdateOnSave
#Overview
name: bp.DisableSearchDataUpdateOnSave
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Don\'t update Blueprint search metadata on save (for QA/testing purposes only). On an editor relaunch, it should include the BP in the unindexed count after the first search.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bp.DisableSearchDataUpdateOnSave is to control the updating of Blueprint search metadata when saving a Blueprint. This setting is primarily used for quality assurance and testing purposes within the Unreal Engine’s Blueprint system.
This setting variable is used in the Engine module, specifically within the Blueprint functionality. It’s referenced in the Engine/Private/Blueprint.cpp file, which is part of the core engine’s Blueprint implementation.
The value of this variable is set through a console variable (CVar) system. It’s initialized as a TAutoConsoleVariable with a default value of false, meaning that by default, Blueprint search metadata is updated on save.
The associated variable CVarBPDisableSearchDataUpdateOnSave directly interacts with bp.DisableSearchDataUpdateOnSave. They share the same value and purpose.
Developers must be aware that this variable is intended for QA and testing purposes only. Enabling it will prevent the update of Blueprint search metadata on save, which can affect the behavior of Blueprint searches in the editor.
Best practices for using this variable include:
- Only enable it for specific testing scenarios where you need to simulate outdated search metadata.
- Remember to disable it after testing to ensure normal Blueprint search functionality.
- Be aware that enabling this variable will cause newly saved Blueprints to be reported as “unindexed” after an editor relaunch, until the asset is loaded.
Regarding the associated variable CVarBPDisableSearchDataUpdateOnSave:
- It’s the C++ implementation of the console variable.
- It’s used in the UBlueprint::PreSave function to determine whether to clear the cached search metadata value.
- When its value is true, it adds the EAddOrUpdateBlueprintSearchMetadataFlags::ClearCachedValue flag, which prevents the search metadata from being updated.
- Developers should use this variable through the console command system rather than directly in C++ code, unless they’re working on the engine’s Blueprint system itself.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Blueprint.cpp:356
Scope: file
Source code excerpt:
#if WITH_EDITORONLY_DATA
static TAutoConsoleVariable<bool> CVarBPDisableSearchDataUpdateOnSave(
TEXT("bp.DisableSearchDataUpdateOnSave"),
false,
TEXT("Don't update Blueprint search metadata on save (for QA/testing purposes only). On an editor relaunch, it should include the BP in the unindexed count after the first search."),
ECVF_Cheat);
static TAutoConsoleVariable<bool> CVarBPForceOldSearchDataFormatVersionOnSave(
TEXT("bp.ForceOldSearchDataFormatVersionOnSave"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarBPDisableSearchDataUpdateOnSave
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Blueprint.cpp:355
Scope: file
Source code excerpt:
#if WITH_EDITORONLY_DATA
static TAutoConsoleVariable<bool> CVarBPDisableSearchDataUpdateOnSave(
TEXT("bp.DisableSearchDataUpdateOnSave"),
false,
TEXT("Don't update Blueprint search metadata on save (for QA/testing purposes only). On an editor relaunch, it should include the BP in the unindexed count after the first search."),
ECVF_Cheat);
static TAutoConsoleVariable<bool> CVarBPForceOldSearchDataFormatVersionOnSave(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Blueprint.cpp:389
Scope (from outer to inner):
file
function void UBlueprint::PreSave
Source code excerpt:
// For regression testing, we exclude the registry tag on save by clearing the cached value.
// Expected result: On an editor relaunch it should cause this BP to be reported as "unindexed," until the asset is loaded.
if (CVarBPDisableSearchDataUpdateOnSave.GetValueOnGameThread())
{
Flags |= EAddOrUpdateBlueprintSearchMetadataFlags::ClearCachedValue;
}
// For regression testing, we allow an old format version to be used as an override on save.
// Expected result: On an editor relaunch it should cause this BP to be reported as "out-of-date," until the asset is loaded.