bp.ForceOldSearchDataFormatVersionOnSave
bp.ForceOldSearchDataFormatVersionOnSave
#Overview
name: bp.ForceOldSearchDataFormatVersionOnSave
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Force Blueprint search metadata to use an old format version on save (for QA/testing purposes only). On an editor relaunch, it should include the BP in the out-of-date count after the first search.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bp.ForceOldSearchDataFormatVersionOnSave is to force Blueprint search metadata to use an old format version when saving, specifically for QA and testing purposes.
This setting variable is primarily used in the Blueprint system, which is part of Unreal Engine’s core functionality. Based on the callsites, it’s evident that this variable is utilized within the Engine module, specifically in the Blueprint-related code.
The value of this variable is set through a console variable (CVar) system, which allows for runtime configuration. It’s defined as a static TAutoConsoleVariable
The associated variable CVarBPForceOldSearchDataFormatVersionOnSave directly interacts with bp.ForceOldSearchDataFormatVersionOnSave. They share the same value and purpose.
Developers must be aware that this variable is intended for testing purposes only. When enabled, it forces the use of an old format version for Blueprint search metadata during saving. This can affect the behavior of the Blueprint system, particularly in how it handles search functionality and metadata versioning.
Best practices when using this variable include:
- Only use it for QA and testing purposes, not in production environments.
- Be aware that enabling this will cause Blueprints to be reported as “out-of-date” after an editor relaunch, until the asset is loaded.
- Use it temporarily and disable it after testing to ensure normal Blueprint functionality.
Regarding the associated variable CVarBPForceOldSearchDataFormatVersionOnSave:
The purpose of CVarBPForceOldSearchDataFormatVersionOnSave is the same as bp.ForceOldSearchDataFormatVersionOnSave - to force Blueprint search metadata to use an old format version on save for testing purposes.
This variable is used in the Blueprint system within the Engine module. It’s specifically utilized in the UBlueprint::PreSave function, which is called before a Blueprint is saved.
The value of this variable is set when the console variable is initialized, with a default value of false. It can be changed at runtime through the console variable system.
CVarBPForceOldSearchDataFormatVersionOnSave directly interacts with the bp.ForceOldSearchDataFormatVersionOnSave setting. When its value is true, it causes the OverrideVersion to be set to EFiBVersion::FIB_VER_BASE, which is the old format version.
Developers should be aware that this variable affects the FFindInBlueprintSearchManager, which manages Blueprint search functionality. When enabled, it will cause Blueprints to be reported as out-of-date after an editor relaunch.
Best practices for using this variable include:
- Use it only for debugging and testing scenarios related to Blueprint search functionality.
- Remember to disable it after testing to restore normal Blueprint search behavior.
- Be prepared for potential impacts on Blueprint search results and performance when this variable is enabled.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Blueprint.cpp:362
Scope: file
Source code excerpt:
static TAutoConsoleVariable<bool> CVarBPForceOldSearchDataFormatVersionOnSave(
TEXT("bp.ForceOldSearchDataFormatVersionOnSave"),
false,
TEXT("Force Blueprint search metadata to use an old format version on save (for QA/testing purposes only). On an editor relaunch, it should include the BP in the out-of-date count after the first search."),
ECVF_Cheat);
void UBlueprint::PreSave(const class ITargetPlatform* TargetPlatform)
{
#Associated Variable and Callsites
This variable is associated with another variable named CVarBPForceOldSearchDataFormatVersionOnSave
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Blueprint.cpp:361
Scope: file
Source code excerpt:
ECVF_Cheat);
static TAutoConsoleVariable<bool> CVarBPForceOldSearchDataFormatVersionOnSave(
TEXT("bp.ForceOldSearchDataFormatVersionOnSave"),
false,
TEXT("Force Blueprint search metadata to use an old format version on save (for QA/testing purposes only). On an editor relaunch, it should include the BP in the out-of-date count after the first search."),
ECVF_Cheat);
void UBlueprint::PreSave(const class ITargetPlatform* TargetPlatform)
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Blueprint.cpp:397
Scope (from outer to inner):
file
function void UBlueprint::PreSave
Source code excerpt:
// Expected result: On an editor relaunch it should cause this BP to be reported as "out-of-date," until the asset is loaded.
EFiBVersion OverrideVersion = EFiBVersion::FIB_VER_NONE;
if (CVarBPForceOldSearchDataFormatVersionOnSave.GetValueOnGameThread())
{
OverrideVersion = EFiBVersion::FIB_VER_BASE;
}
// Cache the BP for use (immediate, since we're about to save)
FFindInBlueprintSearchManager::Get().AddOrUpdateBlueprintSearchMetadata(this, Flags, OverrideVersion);