Editor.AsyncTextureCompilationFinishAll
Editor.AsyncTextureCompilationFinishAll
#Overview
name: Editor.AsyncTextureCompilationFinishAll
This variable is created as a Console Variable (cvar).
- type:
Cmd
- help:
Finish all textures compilations
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Editor.AsyncTextureCompilationFinishAll is to control the asynchronous compilation of textures in the Unreal Engine editor. This setting is part of the editor’s performance optimization features, specifically for texture processing.
This setting variable is primarily used in the Engine’s texture compilation system, which is part of the Runtime/Engine module. It interacts with the UnrealEd module, particularly with the EditorExperimentalSettings class.
The value of this variable is not directly set in the provided code snippets. However, it is closely associated with the bEnableAsyncTextureCompilation variable, which is defined in the UEditorExperimentalSettings class. The bEnableAsyncTextureCompilation variable is initialized to false by default in the constructor of UEditorExperimentalSettings.
The Editor.AsyncTextureCompilationFinishAll variable interacts with other async compilation-related variables and functions, such as CVarAsyncTextureStandard.AsyncCompilation and CVarAsyncTextureStandard.AsyncCompilationMaxConcurrency. These are used together to manage the asynchronous compilation of textures.
Developers should be aware that this variable is part of the experimental settings in the editor. Its behavior may change in future engine versions, and it might have performance implications depending on the project’s size and complexity.
Best practices when using this variable include:
- Testing the performance impact of enabling/disabling async texture compilation in your specific project.
- Monitoring texture compilation times and overall editor performance when this setting is changed.
- Being cautious when modifying experimental settings, as they may not be fully stable or optimized for all use cases.
Regarding the associated variable bEnableAsyncTextureCompilation:
The purpose of bEnableAsyncTextureCompilation is to enable or disable asynchronous texture compilation in the editor. This setting is designed to improve PIE (Play In Editor) and map load time performance when texture compilation is required.
This variable is part of the UEditorExperimentalSettings class in the UnrealEd module. It’s a boolean property that can be edited in the editor’s project settings under the Performance category.
The value of bEnableAsyncTextureCompilation is set to false by default in the UEditorExperimentalSettings constructor. However, it can be changed through the editor’s settings interface or programmatically.
This variable interacts with the async compilation system, particularly with the TextureCompilingManagerImpl namespace functions.
Developers should be aware that this is an experimental feature, and its performance benefits may vary depending on the project. It’s important to test the impact of enabling this feature in your specific use case.
Best practices for using bEnableAsyncTextureCompilation include:
- Experimenting with this setting to determine if it provides performance benefits for your project.
- Monitoring texture compilation times and overall editor performance when this setting is enabled.
- Being prepared to disable this feature if it causes any unexpected behavior or performance issues.
- Keeping the engine and project updated, as experimental features may be improved or stabilized in future versions.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/TextureCompiler.cpp:67
Scope (from outer to inner):
file
namespace TextureCompilingManagerImpl
function static void EnsureInitializedCVars
Source code excerpt:
AsyncCompilationHelpers::EnsureInitializedCVars(
TEXT("texture"),
CVarAsyncTextureStandard.AsyncCompilation,
CVarAsyncTextureStandard.AsyncCompilationMaxConcurrency,
GET_MEMBER_NAME_CHECKED(UEditorExperimentalSettings, bEnableAsyncTextureCompilation));
}
}
}
#Associated Variable and Callsites
This variable is associated with another variable named bEnableAsyncTextureCompilation
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/EditorExperimentalSettings.h:10
Scope (from outer to inner):
file
class class UEditorExperimentalSettings : public UObject
Source code excerpt:
#include "EditorExperimentalSettings.generated.h"
/**
* Implements Editor settings for experimental features.
*/
UCLASS(config=EditorPerProjectUserSettings, MinimalAPI)
class UEditorExperimentalSettings
: public UObject
{
GENERATED_UCLASS_BODY()
public:
/** Enable async texture compilation to improve PIE and map load time performance when compilation is required */
UPROPERTY(EditAnywhere, config, Category = Performance, meta = (DisplayName = "Enable async texture compilation and loading"))
bool bEnableAsyncTextureCompilation;
/** Enable async static mesh compilation to improve import and map load time performance when compilation is required */
UPROPERTY(EditAnywhere, config, Category = Performance, meta = (DisplayName = "Enable async static mesh compilation and loading"))
bool bEnableAsyncStaticMeshCompilation;
/** Enable async skeletal mesh compilation to improve import and map load time performance when compilation is required */
UE_DEPRECATED(5.1, "Deprecated & replaced by bEnableAsyncSkinnedAssetCompilation.")
UPROPERTY(/*EditAnywhere - deprecated & replaced by bEnableAsyncSkinnedAssetCompilation, */config/*, Category = Performance, meta = (DisplayName = "Enable async skeletal mesh compilation and loading")*/)
bool bEnableAsyncSkeletalMeshCompilation;
/** Enable async skinned asset compilation to improve import and map load time performance when compilation is required */
UPROPERTY(EditAnywhere, config, Category = Performance, meta = (DisplayName = "Enable async skinned asset compilation and loading"))
bool bEnableAsyncSkinnedAssetCompilation;
/** Enable async sound compilation to improve import and map load time performance when compilation is required */
UPROPERTY(EditAnywhere, config, Category = Performance, meta = (DisplayName = "Enable async sound compilation and loading"))
bool bEnableAsyncSoundWaveCompilation;
/** Allows the editor to run on HDR monitors on Windows 10 */
UPROPERTY(EditAnywhere, config, Category = HDR, meta = (ConfigRestartRequired = true, DisplayName = "Enable Editor Support for HDR Monitors"))
bool bHDREditor;
/** The brightness of the slate UI on HDR monitors */
UPROPERTY(EditAnywhere, config, Category = HDR, meta = (ClampMin = "100.0", ClampMax = "300.0", UIMin = "100.0", UIMax = "300.0"))
float HDREditorNITLevel;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/SettingsClasses.cpp:171
Scope (from outer to inner):
file
function UEditorExperimentalSettings::UEditorExperimentalSettings
Source code excerpt:
static TAutoConsoleVariable<int32> CVarEditorHDRSupport(
TEXT("Editor.HDRSupport"),
0,
TEXT("Sets whether or not we should allow the editor to run on HDR monitors"),
ECVF_Default);
static TAutoConsoleVariable<float> CVarEditorHDRNITLevel(
TEXT("Editor.HDRNITLevel"),
160.0f,
TEXT("Sets The desired NIT level of the editor when running on HDR"),
ECVF_Default);
UEditorExperimentalSettings::UEditorExperimentalSettings( const FObjectInitializer& ObjectInitializer )
: Super(ObjectInitializer)
, bEnableAsyncTextureCompilation(false)
, bEnableAsyncStaticMeshCompilation(false)
, bEnableAsyncSkeletalMeshCompilation(true) // This was false and set to True in /Engine/Config/BaseEditorPerProjectUserSettings.ini. The setting is removed from .ini so change it to default True.
, bEnableAsyncSkinnedAssetCompilation(false)
, bEnableAsyncSoundWaveCompilation(false)
, bHDREditor(false)
, HDREditorNITLevel(160.0f)
, bUseOpenCLForConvexHullDecomp(false)
, bAllowPotentiallyUnsafePropertyEditing(false)
, bPackedLevelActor(true)
, bLevelInstance(true)
{
}
void UEditorExperimentalSettings::PostInitProperties()
{
PRAGMA_DISABLE_DEPRECATION_WARNINGS
// bEnableAsyncSkeletalMeshCompilation's default to True (see comment in constructor above).
// To be backwards compatible, if a user project overrides it to False, pass on the value to bEnableAsyncSkinnedAssetCompilation.
if (!bEnableAsyncSkeletalMeshCompilation)
{
UE_LOG(LogSettingsClasses, Warning, TEXT("bEnableAsyncSkeletalMeshCompilation is deprecated and replaced with bEnableAsyncSkinnedAssetCompilation. Please update the config. Setting bEnableAsyncSkinnedAssetCompilation to False."));
bEnableAsyncSkinnedAssetCompilation = false;
}
PRAGMA_ENABLE_DEPRECATION_WARNINGS
CVarEditorHDRSupport->Set(bHDREditor ? 1 : 0, ECVF_SetByProjectSetting);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/TextureCompiler.cpp:58
Scope (from outer to inner):
file
namespace TextureCompilingManagerImpl
function static void EnsureInitializedCVars
Source code excerpt:
}
static void EnsureInitializedCVars()
{
static bool bIsInitialized = false;
if (!bIsInitialized)
{
bIsInitialized = true;
AsyncCompilationHelpers::EnsureInitializedCVars(
TEXT("texture"),
CVarAsyncTextureStandard.AsyncCompilation,
CVarAsyncTextureStandard.AsyncCompilationMaxConcurrency,
GET_MEMBER_NAME_CHECKED(UEditorExperimentalSettings, bEnableAsyncTextureCompilation));
}
}
}
FTextureCompilingManager::FTextureCompilingManager()
: Notification(MakeUnique<FAsyncCompilationNotification>(GetAssetNameFormat()))
{
TextureCompilingManagerImpl::EnsureInitializedCVars();
}
FName FTextureCompilingManager::GetStaticAssetTypeName()
{
return TEXT("UE-Texture");
}
bool FTextureCompilingManager::IsCompilingTexture(UTexture* InTexture) const
{
check(IsInGameThread());
if (!InTexture)
{
return false;
}
const TWeakObjectPtr<UTexture> InWeakTexturePtr = InTexture;
uint32 Hash = GetTypeHash(InWeakTexturePtr);