DetailsPanel.UI.ForceShowComponentEditor

DetailsPanel.UI.ForceShowComponentEditor

#Overview

name: DetailsPanel.UI.ForceShowComponentEditor

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of DetailsPanel.UI.ForceShowComponentEditor is to control the visibility of the component editor in the main viewport and blueprint details panel for UObjects.

This setting variable is primarily used by the Property Editor module in Unreal Engine, specifically within the Details Display Manager system. It affects the UI behavior of the details panel, which is a crucial part of the editor interface.

The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of false, meaning the component editor is not forced to show by default.

The associated variable CVarForceShowComponentEditor directly interacts with DetailsPanel.UI.ForceShowComponentEditor. They share the same value and purpose.

Developers must be aware that enabling this variable will override the normal visibility behavior of the component editor for certain UObjects. This could potentially clutter the interface or expose editing capabilities that are usually hidden for specific object types.

Best practices when using this variable include:

  1. Use it primarily for debugging or development purposes, not in production builds.
  2. Be cautious when enabling it, as it may affect the editor’s performance or user experience.
  3. Remember to disable it after use to return to the default behavior.

Regarding the associated variable CVarForceShowComponentEditor:

The purpose of CVarForceShowComponentEditor is to provide programmatic access to the DetailsPanel.UI.ForceShowComponentEditor setting within the C++ code.

It’s used within the FDetailsDisplayManager class to determine whether to force the display of the component editor. The GetForceShowSubObjectEditor() function specifically uses this variable to control the behavior.

The value of CVarForceShowComponentEditor is set through the CVar system, similar to DetailsPanel.UI.ForceShowComponentEditor.

Developers should be aware that changes to CVarForceShowComponentEditor will directly affect the behavior controlled by DetailsPanel.UI.ForceShowComponentEditor.

Best practices for using CVarForceShowComponentEditor include:

  1. Use GetValueOnAnyThread() to safely access its value from any thread.
  2. Consider the performance implications of frequently checking this value in performance-critical code paths.
  3. If modifying this variable at runtime, ensure that the UI is updated appropriately to reflect the changes.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Editor/PropertyEditor/Private/DetailsDisplayManager.cpp:11

Scope: file

Source code excerpt:


static TAutoConsoleVariable<bool> CVarForceShowComponentEditor(
	TEXT("DetailsPanel.UI.ForceShowComponentEditor"),
	false,
	TEXT("If true, forces the component editor to show in the main viewport and blueprint details panel for UObjects which normally have it hidden."));


FDetailsDisplayManager::FDetailsDisplayManager(): bIsOuterCategory(false)
{

#Associated Variable and Callsites

This variable is associated with another variable named CVarForceShowComponentEditor. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Editor/PropertyEditor/Private/DetailsDisplayManager.cpp:10

Scope: file

Source code excerpt:

#define LOCTEXT_NAMESPACE "DetailsDisplayManager"

static TAutoConsoleVariable<bool> CVarForceShowComponentEditor(
	TEXT("DetailsPanel.UI.ForceShowComponentEditor"),
	false,
	TEXT("If true, forces the component editor to show in the main viewport and blueprint details panel for UObjects which normally have it hidden."));


FDetailsDisplayManager::FDetailsDisplayManager(): bIsOuterCategory(false)

#Loc: <Workspace>/Engine/Source/Editor/PropertyEditor/Private/DetailsDisplayManager.cpp:172

Scope (from outer to inner):

file
function     bool FDetailsDisplayManager::GetForceShowSubObjectEditor

Source code excerpt:

bool FDetailsDisplayManager::GetForceShowSubObjectEditor()
{
	return CVarForceShowComponentEditor.GetValueOnAnyThread();
}

#undef LOCTEXT_NAMESPACE