UMG.ThumbnailRenderer.Enable
UMG.ThumbnailRenderer.Enable
#Overview
name: UMG.ThumbnailRenderer.Enable
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Option to enable/disable thumbnail rendering.
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:
- This variable affects editor functionality, not runtime behavior.
- Changing this variable’s value will impact the visual representation of widget blueprints in the editor.
- The variable’s state is checked during the post-engine initialization phase.
Best practices when using this variable include:
- Only modify it if there’s a specific need to disable thumbnail rendering for UMG widgets.
- Be aware that disabling thumbnail rendering might affect the user experience in the editor, as users may not see visual previews of widget blueprints.
- If performance issues are encountered in the editor, consider disabling this as a potential optimization.
Regarding the associated variable CVarThumbnailRenderEnable:
- It is the actual TAutoConsoleVariable instance that controls the UMG.ThumbnailRenderer.Enable setting.
- It’s set up with a callback function (ThumbnailRenderingEnabled) that gets called when the variable’s value changes.
- This allows the UMG Editor module to react to changes in the thumbnail rendering setting dynamically.
- Developers can use this variable to programmatically check or modify the thumbnail rendering state within C++ code.
When working with CVarThumbnailRenderEnable, developers should:
- Use it to read the current state of thumbnail rendering if needed in C++ code.
- Be cautious about changing its value during runtime, as it might have immediate effects on the editor’s behavior.
- 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);