AutoReimportDirectorySettings
AutoReimportDirectorySettings
#Overview
name: AutoReimportDirectorySettings
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 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of AutoReimportDirectorySettings is to manage directories that are monitored for automatic reimporting of content in Unreal Engine 5. This setting is primarily used for the auto-reimport system, which is part of the editor’s content management and asset pipeline.
This setting variable is relied upon by the Unreal Engine’s editor subsystem, specifically the auto-reimport manager. It is part of the UnrealEd module, which is responsible for various editor functionalities.
The value of this variable is set in the EditorLoadingSavingSettings class, which is part of the editor’s configuration. It can be modified through the editor’s project settings interface or programmatically.
AutoReimportDirectorySettings interacts with other variables in the EditorLoadingSavingSettings class, such as AutoReimportThreshold, bAutoCreateAssets, and bAutoDeleteAssets. These variables work together to control the behavior of the auto-reimport system.
Developers must be aware that this variable is an array of FAutoReimportDirectoryConfig structures, each containing a SourceDirectory and MountPoint. The SourceDirectory can be either a virtual package path (e.g., /Game/) or an absolute path on disk. These paths should point to locations of source content files (e.g., *.fbx, *.png) that are eligible for auto-reimport.
Best practices when using this variable include:
- Carefully selecting directories to monitor to avoid unnecessary processing.
- Ensuring that the paths are correctly set to cover all necessary source content locations.
- Combining this setting with other auto-reimport settings for optimal workflow.
- Regularly reviewing and updating these settings as project structure evolves.
- Being mindful of performance implications when monitoring large directories or numerous files.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:185, section: [/Script/UnrealEd.EditorLoadingSavingSettings]
- INI Section:
/Script/UnrealEd.EditorLoadingSavingSettings
- Raw value:
(SourceDirectory="/Game/",MountPoint=,Wildcards=((Wildcard="Localization/*")))
- Is Array:
True
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/EditorLoadingSavingSettings.h:133
Scope (from outer to inner):
file
class class UEditorLoadingSavingSettings : public UObject
Source code excerpt:
/** Directories being monitored for Auto Reimport */
UPROPERTY(EditAnywhere, config, AdvancedDisplay,Category=AutoReimport, meta=(DisplayName="Directories to Monitor", ToolTip="Lists every directory to monitor for content changes. Can be virtual package paths (eg /Game/ or /MyPlugin/), or absolute paths on disk.\nPaths should point to the locations of the source content files (e.g. *.fbx, *.png) you want to be eligible for auto-reimport."))
TArray<FAutoReimportDirectoryConfig> AutoReimportDirectorySettings;
UPROPERTY(EditAnywhere, config, AdvancedDisplay, Category=AutoReimport, meta=(ClampMin=0, ClampMax=60, Units=Seconds, DisplayName="Import Threshold Time", ToolTip="Specifies an amount of time to wait before a specific file change is considered for auto reimport"))
float AutoReimportThreshold;
UPROPERTY(EditAnywhere, config, AdvancedDisplay, Category=AutoReimport, meta=(DisplayName="Auto Create Assets", ToolTip="When enabled, newly added source content files will be automatically imported into new assets."))
bool bAutoCreateAssets;
UPROPERTY(EditAnywhere, config, AdvancedDisplay, Category=AutoReimport, meta=(DisplayName="Auto Delete Assets", ToolTip="When enabled, deleting a source content file will automatically prompt the deletion of any related assets."))
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/AutoReimport/AutoReimportManager.cpp:907
Scope (from outer to inner):
file
function void FAutoReimportManager::HandleLoadingSavingSettingChanged
Source code excerpt:
{
if (PropertyName == GET_MEMBER_NAME_CHECKED(UEditorLoadingSavingSettings, bMonitorContentDirectories) ||
PropertyName == GET_MEMBER_NAME_CHECKED(UEditorLoadingSavingSettings, AutoReimportDirectorySettings))
{
ResetMonitorsTimeout = DirectoryWatcher::FTimeLimit(5.f);
}
}
void FAutoReimportManager::OnContentPathChanged(const FString& InAssetPath, const FString& FileSystemPath)
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/AutoReimport/AutoReimportManager.cpp:934
Scope (from outer to inner):
file
function void FAutoReimportManager::SetUpDirectoryMonitors
Source code excerpt:
TArray<FParsedSettings> FinalArray;
FString SupportedExtensions = GetAllFactoryExtensions();
for (const FAutoReimportDirectoryConfig& Setting : GetDefault<UEditorLoadingSavingSettings>()->AutoReimportDirectorySettings)
{
FParsedSettings NewMapping;
NewMapping.SourceDirectory = Setting.SourceDirectory;
NewMapping.MountPoint = Setting.MountPoint;
if (!FAutoReimportDirectoryConfig::ParseSourceDirectoryAndMountPoint(NewMapping.SourceDirectory, NewMapping.MountPoint))
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/SettingsClasses.cpp:258
Scope (from outer to inner):
file
function UEditorLoadingSavingSettings::UEditorLoadingSavingSettings
Source code excerpt:
FAutoReimportDirectoryConfig Default;
Default.SourceDirectory = TEXT("/Game/");
AutoReimportDirectorySettings.Add(Default);
bPromptBeforeAutoImporting = true;
}
// @todo thomass: proper settings support for source control module
void UEditorLoadingSavingSettings::SccHackInitialize()
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/SettingsClasses.cpp:294
Scope (from outer to inner):
file
function void UEditorLoadingSavingSettings::PostInitProperties
Source code excerpt:
if (AutoReimportDirectories_DEPRECATED.Num() != 0)
{
AutoReimportDirectorySettings.Empty();
for (const auto& String : AutoReimportDirectories_DEPRECATED)
{
FAutoReimportDirectoryConfig Config;
Config.SourceDirectory = String;
AutoReimportDirectorySettings.Add(Config);
}
AutoReimportDirectories_DEPRECATED.Empty();
}
Super::PostInitProperties();
}