bLivePreviewUpdate
bLivePreviewUpdate
#Overview
name: bLivePreviewUpdate
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bLivePreviewUpdate is to control the live preview update functionality in the Unreal Engine 5 Material Editor. This setting variable is used to determine whether the material preview should be automatically updated in real-time as changes are made to the material graph.
This setting variable is primarily used within the Material Editor subsystem of Unreal Engine 5. Based on the callsites, it is referenced in the MaterialEditor module, specifically in the FMaterialEditor class.
The value of this variable is set in two main places:
- It is loaded from the editor settings when the Material Editor is initialized (in the LoadEditorSettings function).
- It is saved to the editor settings when the Material Editor is closed or when settings are explicitly saved (in the SaveEditorSettings function).
The bLivePreviewUpdate variable interacts with other editor settings, such as bAlwaysRefreshAllPreviews and bRealtimeExpressionViewport. These settings collectively control the real-time update behavior of the Material Editor.
Developers should be aware that enabling this setting may impact performance, especially when working with complex materials. Real-time updates can be resource-intensive, so it’s important to consider the trade-off between immediate feedback and editor responsiveness.
Best practices when using this variable include:
- Enable it when working on materials that require frequent visual feedback.
- Disable it when working on performance-intensive materials or on less powerful hardware to improve editor responsiveness.
- Use it in conjunction with other preview settings to fine-tune the Material Editor experience.
- Remember that this setting is per-project, so it should be configured based on the specific needs of each project.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:488, section: [/Script/UnrealEd.MaterialEditorOptions]
- INI Section:
/Script/UnrealEd.MaterialEditorOptions
- Raw value:
True
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/MaterialEditor/Private/MaterialEditor.cpp:2494
Scope (from outer to inner):
file
function void FMaterialEditor::LoadEditorSettings
Source code excerpt:
if (EditorOptions->bHideUnusedConnectorsSetting) {OnHideConnectors();}
if (bLivePreview != EditorOptions->bLivePreviewUpdate)
{
ToggleLivePreview();
}
if (EditorOptions->bAlwaysRefreshAllPreviews) {OnAlwaysRefreshAllPreviews();}
if (EditorOptions->bRealtimeExpressionViewport) {ToggleRealTimeExpressions();}
#Loc: <Workspace>/Engine/Source/Editor/MaterialEditor/Private/MaterialEditor.cpp:2539
Scope (from outer to inner):
file
function void FMaterialEditor::SaveEditorSettings
Source code excerpt:
EditorOptions->bAlwaysRefreshAllPreviews = IsOnAlwaysRefreshAllPreviews();
EditorOptions->bRealtimeExpressionViewport = IsToggleRealTimeExpressionsChecked();
EditorOptions->bLivePreviewUpdate = IsToggleLivePreviewChecked();
EditorOptions->bHideUnrelatedNodes = bHideUnrelatedNodes;
EditorOptions->SaveConfig();
}
GConfig->SetInt(TEXT("MaterialEditor"), TEXT("PrimType"), PreviewViewport->PreviewPrimType, GEditorPerProjectIni);
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Preferences/MaterialEditorOptions.h:36
Scope (from outer to inner):
file
class class UMaterialEditorOptions : public UObject
Source code excerpt:
/** If true, always refresh the material preview. */
UPROPERTY(EditAnywhere, config, Category = Options)
uint32 bLivePreviewUpdate : 1;
/** If true, fade nodes which are not connected to the selected nodes */
UPROPERTY(EditAnywhere, config, Category=Options)
uint32 bHideUnrelatedNodes:1;
/** If true, always refresh all expression previews. */