Editor.AsyncTextureCompilationResume
Editor.AsyncTextureCompilationResume
#Overview
name: Editor.AsyncTextureCompilationResume
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Number of queued work to resume while paused.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Editor.AsyncTextureCompilationResume is to enable or disable asynchronous texture compilation in the Unreal Engine editor. This setting is primarily used for improving performance during texture compilation processes.
The Unreal Engine subsystem that relies on this setting variable is the texture compilation system, which is part of the engine’s asset processing pipeline. It’s specifically used in the TextureCompilingManager, which is responsible for managing the compilation of textures.
The value of this variable is set through the UEditorExperimentalSettings class, which is part of the editor’s configuration settings. It’s associated with the bEnableAsyncTextureCompilation variable in this class.
The variable interacts with other async compilation settings, such as those for static meshes, skeletal meshes, and sound waves. It’s part of a broader system for asynchronous asset compilation in the engine.
Developers must be aware that enabling this feature can improve PIE (Play In Editor) and map load time performance when texture compilation is required. However, it may also introduce some complexity in terms of asset loading and readiness.
Best practices when using this variable include:
- Enable it when working on projects with many textures that require frequent recompilation.
- Monitor performance improvements and potential side effects when enabled.
- Consider enabling other async compilation features (like for static meshes or sounds) for a more comprehensive performance boost.
Regarding the associated variable bEnableAsyncTextureCompilation:
The purpose of bEnableAsyncTextureCompilation is to provide a user-facing toggle for the async texture compilation feature in the editor’s experimental settings.
This variable is part of the UEditorExperimentalSettings class, which is used to manage various experimental features in the Unreal Editor.
The value of this variable is set in the constructor of UEditorExperimentalSettings and can be modified through the editor’s project settings interface.
It directly interacts with the Editor.AsyncTextureCompilationResume console variable, effectively controlling the same feature.
Developers should be aware that this is an experimental feature and may have implications on project stability or behavior.
Best practices for using this variable include:
- Test thoroughly after enabling or disabling to ensure it doesn’t negatively impact your specific project.
- Use in conjunction with other async compilation settings for a comprehensive approach to improving asset compilation performance.
- Be prepared to disable it if unexpected issues arise, as it’s an experimental feature.
#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);