bp.EnableDeprecatedWarningForComponentDelegateNodes
bp.EnableDeprecatedWarningForComponentDelegateNodes
#Overview
name: bp.EnableDeprecatedWarningForComponentDelegateNodes
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Show Deprecated warning for component delegate event nodes
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bp.EnableDeprecatedWarningForComponentDelegateNodes is to control the display of deprecated warnings for component delegate event nodes in Unreal Engine’s Blueprint system. This setting is primarily used in the Blueprint Graph subsystem of the Unreal Engine editor.
The Unreal Engine subsystem that relies on this setting variable is the Blueprint Graph module, specifically within the component bound event functionality. This can be seen from the file location where the variable is defined and used: Engine/Source/Editor/BlueprintGraph/Private/K2Node_ComponentBoundEvent.cpp.
The value of this variable is set using a console variable (CVar) system. It’s initialized with a default value of true, meaning that by default, deprecated warnings for component delegate event nodes will be shown.
This variable interacts directly with its associated variable CVarBPEnableDeprecatedWarningForComponentDelegateNodes. They share the same value and purpose.
Developers must be aware that this variable affects the visibility of deprecated warnings in the Blueprint editor. When set to true, it will show warnings for component delegate event nodes that are using deprecated properties. This can be crucial for maintaining and updating blueprints to use the most current and supported features.
Best practices when using this variable include:
- Keeping it enabled (true) during development to catch and address any usage of deprecated features.
- Considering disabling it temporarily if working with legacy projects that heavily rely on deprecated features, to reduce noise in the editor.
- Using it in conjunction with other deprecation checks to ensure a comprehensive update of blueprints.
Regarding the associated variable CVarBPEnableDeprecatedWarningForComponentDelegateNodes:
This is the actual console variable that controls the behavior described above. It’s defined as a static TAutoConsoleVariable
The variable is used in the UK2Node_ComponentBoundEvent::HasDeprecatedReference() function to determine whether to check for and return information about deprecated properties. This function likely influences the display of warnings in the Blueprint editor.
Developers should be aware that changes to this console variable will take effect immediately, potentially affecting the visibility of warnings in open Blueprint editor instances. It’s also worth noting that this variable is marked with ECVF_Cheat, which typically means it’s intended for development or debugging purposes and may not be available in shipping builds.
When working with this variable, developers should consider:
- Using it for debugging and development purposes only.
- Documenting any changes to its value, as it could affect the behavior of the Blueprint editor for all users of a project.
- Being cautious about disabling it in production environments, as it could lead to the use of deprecated features without warning.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/K2Node_ComponentBoundEvent.cpp:33
Scope: file
Source code excerpt:
static TAutoConsoleVariable<bool> CVarBPEnableDeprecatedWarningForComponentDelegateNodes(
TEXT("bp.EnableDeprecatedWarningForComponentDelegateNodes"),
true,
TEXT("Show Deprecated warning for component delegate event nodes"),
ECVF_Cheat);
// @TODO_BH: Remove the CVar for validity checking when we can get all the errors sorted out
namespace PinValidityCheck
#Associated Variable and Callsites
This variable is associated with another variable named CVarBPEnableDeprecatedWarningForComponentDelegateNodes
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/K2Node_ComponentBoundEvent.cpp:32
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "K2Node"
static TAutoConsoleVariable<bool> CVarBPEnableDeprecatedWarningForComponentDelegateNodes(
TEXT("bp.EnableDeprecatedWarningForComponentDelegateNodes"),
true,
TEXT("Show Deprecated warning for component delegate event nodes"),
ECVF_Cheat);
// @TODO_BH: Remove the CVar for validity checking when we can get all the errors sorted out
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/K2Node_ComponentBoundEvent.cpp:175
Scope (from outer to inner):
file
function bool UK2Node_ComponentBoundEvent::HasDeprecatedReference
Source code excerpt:
bool UK2Node_ComponentBoundEvent::HasDeprecatedReference() const
{
if (CVarBPEnableDeprecatedWarningForComponentDelegateNodes.GetValueOnAnyThread())
{
if (const FMulticastDelegateProperty* DelegateProperty = GetTargetDelegateProperty())
{
return DelegateProperty->HasAnyPropertyFlags(EPropertyFlags::CPF_Deprecated);
}
}