au.MetaSound.Editor.Debug.ShowNodeDebugData
au.MetaSound.Editor.Debug.ShowNodeDebugData
#Overview
name: au.MetaSound.Editor.Debug.ShowNodeDebugData
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
If enabled, shows debug data such as node IDs, vertex IDs, vertex names, and class names when hovering over node titles and pins in the MetaSound asset editor.\n0: Disabled (default), !0: Enabled
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of au.MetaSound.Editor.Debug.ShowNodeDebugData
is to enable debug data visualization in the MetaSound asset editor within Unreal Engine 5. This setting variable is primarily used for debugging and development purposes in the MetaSound system, which is part of the audio subsystem in Unreal Engine.
The MetaSound editor module relies on this setting variable. It is used specifically in the MetaSound Editor Graph Node functionality, which is part of the MetaSound plugin.
The value of this variable is set using an FAutoConsoleVariableRef
, which means it can be changed at runtime through the console. By default, it is set to 0 (disabled).
The associated variable ShowNodeDebugData
interacts directly with au.MetaSound.Editor.Debug.ShowNodeDebugData
. They share the same value, with ShowNodeDebugData
being used in the actual code logic.
Developers must be aware that enabling this variable will add additional debug information to the MetaSound asset editor UI. This includes node IDs, vertex IDs, vertex names, and class names when hovering over node titles and pins. While useful for debugging, it may clutter the UI during normal development.
Best practices when using this variable include:
- Only enable it when specifically debugging MetaSound graph issues.
- Disable it during normal development to keep the UI clean.
- Use it in conjunction with other MetaSound debugging tools for comprehensive analysis.
Regarding the associated variable ShowNodeDebugData
:
The purpose of ShowNodeDebugData
is to act as an in-code flag for controlling the display of debug data in the MetaSound editor.
It is used within the MetaSound Editor module, specifically in the UMetasoundEditorGraphNode
class.
The value of ShowNodeDebugData
is set by the console variable au.MetaSound.Editor.Debug.ShowNodeDebugData
.
This variable interacts with various parts of the UMetasoundEditorGraphNode
class, particularly in methods like GetPinHoverText
and GetTooltipText
.
Developers should be aware that this variable directly affects the behavior of the MetaSound editor UI. When true, it adds debug information to pin hover text and node tooltips.
Best practices for using ShowNodeDebugData
include:
- Use it as a read-only variable in most cases, as its value is controlled by the console variable.
- Consider its state when implementing new features in the MetaSound editor that might be affected by debug visualizations.
- Ensure that any new debug visualizations added to the MetaSound editor respect this flag for consistency.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/MetasoundEditorGraphNode.cpp:47
Scope (from outer to inner):
file
namespace Metasound::Editor
namespace GraphNodePrivate
Source code excerpt:
int32 ShowNodeDebugData = 0;
FAutoConsoleVariableRef CVarShowNodeDebugData(
TEXT("au.MetaSound.Editor.Debug.ShowNodeDebugData"),
ShowNodeDebugData,
TEXT("If enabled, shows debug data such as node IDs, vertex IDs, vertex names, and class names when hovering over node titles and pins in the MetaSound asset editor.\n")
TEXT("0: Disabled (default), !0: Enabled"),
ECVF_Default);
} // GraphNodePrivate
} // Metasound::Editor
#Associated Variable and Callsites
This variable is associated with another variable named ShowNodeDebugData
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/MetasoundEditorGraphNode.cpp:45
Scope (from outer to inner):
file
namespace Metasound::Editor
namespace GraphNodePrivate
Source code excerpt:
);
int32 ShowNodeDebugData = 0;
FAutoConsoleVariableRef CVarShowNodeDebugData(
TEXT("au.MetaSound.Editor.Debug.ShowNodeDebugData"),
ShowNodeDebugData,
TEXT("If enabled, shows debug data such as node IDs, vertex IDs, vertex names, and class names when hovering over node titles and pins in the MetaSound asset editor.\n")
TEXT("0: Disabled (default), !0: Enabled"),
ECVF_Default);
} // GraphNodePrivate
} // Metasound::Editor
#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/MetasoundEditorGraphNode.cpp:354
Scope (from outer to inner):
file
function void UMetasoundEditorGraphNode::GetPinHoverText
Source code excerpt:
}
if (GraphNodePrivate::ShowNodeDebugData)
{
OutHoverText = FString::Format(TEXT("{0}\nVertex Name: {1}\nDataType: {2}\nID: {3}"),
{
OutHoverText,
InputHandle->GetName().ToString(),
InputHandle->GetDataType().ToString(),
#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/MetasoundEditorGraphNode.cpp:369
Scope (from outer to inner):
file
function void UMetasoundEditorGraphNode::GetPinHoverText
Source code excerpt:
FConstOutputHandle OutputHandle = FGraphBuilder::FindReroutedConstOutputHandleFromPin(&Pin);
OutHoverText = OutputHandle->GetTooltip().ToString();
if (GraphNodePrivate::ShowNodeDebugData)
{
OutHoverText = FString::Format(TEXT("{0}\nVertex Name: {1}\nDataType: {2}\nID: {3}"),
{
OutHoverText,
OutputHandle->GetName().ToString(),
OutputHandle->GetDataType().ToString(),
#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/MetasoundEditorGraphNode.cpp:588
Scope (from outer to inner):
file
function FText UMetasoundEditorGraphNode::GetTooltipText
Source code excerpt:
FConstNodeHandle Node = GetConstNodeHandle();
FText Description = Node->GetDescription();
if (GraphNodePrivate::ShowNodeDebugData)
{
Description = FText::Format(LOCTEXT("Metasound_DebugNodeTooltipText", "{0}\nClass Name: {1}\nNode ID: {2}"),
Description,
FText::FromString(Node->GetClassMetadata().GetClassName().ToString()),
FText::FromString(Node->GetID().ToString())
);