UMG.ThumbnailRenderer.Enable

UMG.ThumbnailRenderer.Enable

#Overview

name: UMG.ThumbnailRenderer.Enable

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

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of UMG.ThumbnailRenderer.Enable is to control the enabling or disabling of thumbnail rendering for UMG (Unreal Motion Graphics) widgets in the Unreal Engine editor.

This setting variable is primarily used by the UMG Editor module, which is part of the Unreal Engine’s editor subsystem. It affects the functionality related to widget blueprint thumbnail rendering.

The value of this variable is set through a console variable (CVar) system. It is initialized with a default value of true, meaning thumbnail rendering is enabled by default.

The associated variable CVarThumbnailRenderEnable interacts directly with UMG.ThumbnailRenderer.Enable. They share the same value and purpose.

Developers should be aware that:

  1. This variable affects editor functionality, not runtime behavior.
  2. Changing this variable’s value will impact the visual representation of widget blueprints in the editor.
  3. The variable’s state is checked during the post-engine initialization phase.

Best practices when using this variable include:

  1. Only modify it if there’s a specific need to disable thumbnail rendering for UMG widgets.
  2. Be aware that disabling thumbnail rendering might affect the user experience in the editor, as users may not see visual previews of widget blueprints.
  3. If performance issues are encountered in the editor, consider disabling this as a potential optimization.

Regarding the associated variable CVarThumbnailRenderEnable:

When working with CVarThumbnailRenderEnable, developers should:

  1. Use it to read the current state of thumbnail rendering if needed in C++ code.
  2. Be cautious about changing its value during runtime, as it might have immediate effects on the editor’s behavior.
  3. Consider the implications on editor performance and user experience when modifying this variable.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/UMGEditor/Private/UMGEditorModule.cpp:47

Scope: file

Source code excerpt:

const FName UMGEditorAppIdentifier = FName(TEXT("UMGEditorApp"));
static TAutoConsoleVariable<bool> CVarThumbnailRenderEnable(
	TEXT("UMG.ThumbnailRenderer.Enable"),
	true,
	TEXT("Option to enable/disable thumbnail rendering.")
);

class FUMGEditorModule : public IUMGEditorModule, public FGCObject
{

#Loc: <Workspace>/Engine/Source/Editor/UMGEditor/Private/UMGEditorModule.cpp:352

Scope (from outer to inner):

file
class        class FUMGEditorModule : public IUMGEditorModule, public FGCObject
function     void OnPostEngineInit

Source code excerpt:

		if (GIsEditor)
		{
			if (IConsoleManager::Get().FindConsoleVariable(TEXT("UMG.ThumbnailRenderer.Enable"))->GetBool())
			{
				UThumbnailManager::Get().RegisterCustomRenderer(UWidgetBlueprint::StaticClass(), UWidgetBlueprintThumbnailRenderer::StaticClass());
				bThumbnailRenderersRegistered = true;
			}
		}
		bOnPostEngineInitHandled = true;

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/UMGEditor/Private/UMGEditorModule.cpp:46

Scope: file

Source code excerpt:


const FName UMGEditorAppIdentifier = FName(TEXT("UMGEditorApp"));
static TAutoConsoleVariable<bool> CVarThumbnailRenderEnable(
	TEXT("UMG.ThumbnailRenderer.Enable"),
	true,
	TEXT("Option to enable/disable thumbnail rendering.")
);

class FUMGEditorModule : public IUMGEditorModule, public FGCObject

#Loc: <Workspace>/Engine/Source/Editor/UMGEditor/Private/UMGEditorModule.cpp:125

Scope (from outer to inner):

file
class        class FUMGEditorModule : public IUMGEditorModule, public FGCObject
function     virtual void StartupModule

Source code excerpt:

		FEdGraphUtilities::RegisterVisualPinFactory(GraphPanelPinFactory);

		CVarThumbnailRenderEnable->AsVariable()->SetOnChangedCallback(FConsoleVariableDelegate::CreateStatic(&FUMGEditorModule::ThumbnailRenderingEnabled));
	}

	/** Called before the module is unloaded, right before the module object is destroyed. */
	virtual void ShutdownModule() override
	{
		FCoreDelegates::OnPostEngineInit.RemoveAll(this);