Editor.AsyncSkinnedAssetCompilation
Editor.AsyncSkinnedAssetCompilation
#Overview
name: Editor.AsyncSkinnedAssetCompilation
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
1 - Async skinned assets compilation is enabled.\n2 - Async skinned assets compilation is enabled but on pause (for debugging).\nWhen enabled, skinned assets will be replaced by placeholders until they are ready\nto reduce stalls on the game thread and improve overall editor performance.
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Editor.AsyncSkinnedAssetCompilation is to enable or disable asynchronous compilation of skinned assets in the Unreal Engine editor. This setting is primarily used for performance optimization during asset import and map loading processes.
This setting variable is primarily used by the Unreal Engine’s asset compilation system, specifically for skinned assets such as skeletal meshes. It is part of the editor’s experimental settings and is utilized in the Engine and UnrealEd modules.
The value of this variable is set in the UEditorExperimentalSettings class, which is part of the editor’s configuration settings. It can be modified through the editor’s Project Settings interface.
This variable interacts closely with its associated variable, bEnableAsyncSkinnedAssetCompilation, which is defined in the UEditorExperimentalSettings class. They share the same value and purpose.
Developers should be aware that this is an experimental feature and may impact the stability or behavior of the editor. It’s important to test thoroughly when enabling this feature, especially in large projects with many skinned assets.
Best practices when using this variable include:
- Enable it in projects with a large number of skinned assets to potentially improve import and load times.
- Monitor performance and stability after enabling to ensure it’s beneficial for your specific project.
- Be prepared to disable it if unexpected issues arise during development.
Regarding the associated variable bEnableAsyncSkinnedAssetCompilation:
The purpose of bEnableAsyncSkinnedAssetCompilation is the same as Editor.AsyncSkinnedAssetCompilation - to control asynchronous compilation of skinned assets.
This variable is part of the UEditorExperimentalSettings class and is used directly in the editor’s configuration system. It’s exposed as an editable property in the Project Settings interface.
The value is set in the UEditorExperimentalSettings constructor and can be modified through the editor interface or project configuration files.
It interacts with the deprecated bEnableAsyncSkeletalMeshCompilation variable for backward compatibility. If bEnableAsyncSkeletalMeshCompilation is set to false in older projects, bEnableAsyncSkinnedAssetCompilation will also be set to false.
Developers should be aware that this setting is part of the experimental features and should be used with caution. It’s also important to note the backward compatibility handling with the older skeletal mesh compilation setting.
Best practices for using this variable include:
- Use it in conjunction with other async compilation settings for consistent behavior.
- Monitor its impact on editor performance and stability.
- Consider enabling it in projects with many skinned assets to potentially improve workflow efficiency.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SkinnedAssetCompiler.cpp:43
Scope (from outer to inner):
file
namespace SkinnedAssetCompilingManagerImpl
function static void EnsureInitializedCVars
Source code excerpt:
AsyncCompilationHelpers::EnsureInitializedCVars(
TEXT("skinnedasset"),
CVarAsyncSkinnedAssetStandard.AsyncCompilation,
CVarAsyncSkinnedAssetStandard.AsyncCompilationMaxConcurrency,
GET_MEMBER_NAME_CHECKED(UEditorExperimentalSettings, bEnableAsyncSkinnedAssetCompilation));
}
}
}
#Associated Variable and Callsites
This variable is associated with another variable named bEnableAsyncSkinnedAssetCompilation
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/EditorExperimentalSettings.h:18
Scope: file
Source code excerpt:
{
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;
/** Allows usage of the procedural foliage system */
UPROPERTY(EditAnywhere, config, Category = Foliage, meta = (DisplayName = "Procedural Foliage"))
bool bProceduralFoliage;
/** Allows usage of the Translation Picker */
UPROPERTY(EditAnywhere, config, Category = Tools, meta = (DisplayName = "Translation Picker"))
bool bEnableTranslationPicker;
/** Specify which console-specific nomenclature to use for gamepad label text */
UPROPERTY(EditAnywhere, config, Category=UserInterface, meta=(DisplayName="Console for Gamepad Labels"))
TEnumAsByte<EConsoleForGamepadLabels::Type> ConsoleForGamepadLabels;
/** Allows for customization of toolbars and menus throughout the editor */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/SettingsClasses.cpp:174
Scope (from outer to inner):
file
function UEditorExperimentalSettings::UEditorExperimentalSettings
Source code excerpt:
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);
CVarEditorHDRNITLevel->Set(HDREditorNITLevel, ECVF_SetByProjectSetting);
Super::PostInitProperties();
}
void UEditorExperimentalSettings::PostEditChangeProperty( struct FPropertyChangedEvent& PropertyChangedEvent )
{
Super::PostEditChangeProperty(PropertyChangedEvent);
const FName Name = (PropertyChangedEvent.Property != nullptr) ? PropertyChangedEvent.Property->GetFName() : NAME_None;
if (Name == GET_MEMBER_NAME_CHECKED(UEditorExperimentalSettings, ConsoleForGamepadLabels))
{
EKeys::SetConsoleForGamepadLabels(ConsoleForGamepadLabels);
}
else if (Name == GET_MEMBER_NAME_CHECKED(UEditorExperimentalSettings, bHDREditor))
{
CVarEditorHDRSupport->Set(bHDREditor ? 1 : 0, ECVF_SetByProjectSetting);
}
else if (Name == GET_MEMBER_NAME_CHECKED(UEditorExperimentalSettings, HDREditorNITLevel))
{
CVarEditorHDRNITLevel->Set(HDREditorNITLevel, ECVF_SetByProjectSetting);
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/SettingsClasses.cpp:189
Scope (from outer to inner):
file
function void UEditorExperimentalSettings::PostInitProperties
Source code excerpt:
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);
CVarEditorHDRNITLevel->Set(HDREditorNITLevel, ECVF_SetByProjectSetting);
Super::PostInitProperties();
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SkinnedAssetCompiler.cpp:34
Scope (from outer to inner):
file
namespace SkinnedAssetCompilingManagerImpl
function static void EnsureInitializedCVars
Source code excerpt:
namespace SkinnedAssetCompilingManagerImpl
{
static void EnsureInitializedCVars()
{
static bool bIsInitialized = false;
if (!bIsInitialized)
{
bIsInitialized = true;
AsyncCompilationHelpers::EnsureInitializedCVars(
TEXT("skinnedasset"),
CVarAsyncSkinnedAssetStandard.AsyncCompilation,
CVarAsyncSkinnedAssetStandard.AsyncCompilationMaxConcurrency,
GET_MEMBER_NAME_CHECKED(UEditorExperimentalSettings, bEnableAsyncSkinnedAssetCompilation));
}
}
}
FSkinnedAssetCompilingManager::FSkinnedAssetCompilingManager()
: Notification(MakeUnique<FAsyncCompilationNotification>(GetAssetNameFormat()))
{
SkinnedAssetCompilingManagerImpl::EnsureInitializedCVars();
PostReachabilityAnalysisHandle = FCoreUObjectDelegates::PostReachabilityAnalysis.AddRaw(this, &FSkinnedAssetCompilingManager::OnPostReachabilityAnalysis);
PreGarbageCollectHandle = FCoreUObjectDelegates::GetPreGarbageCollectDelegate().AddRaw(this, &FSkinnedAssetCompilingManager::OnPreGarbageCollect);
}
FName FSkinnedAssetCompilingManager::GetAssetTypeName() const
{
return TEXT("UE-SkinnedAsset");
}
FTextFormat FSkinnedAssetCompilingManager::GetAssetNameFormat() const
{
return LOCTEXT("SkinnedAssetNameFormat", "{0}|plural(one=Skinned Asset,other=Skinned Assets)");
}
TArrayView<FName> FSkinnedAssetCompilingManager::GetDependentTypeNames() const
{
// Texture and shaders can affect materials which can affect Skinned Assets once they are visible.
// Adding these dependencies can reduces the actual number of render state update we need to do in a frame