bValidateUnloadedSoftActorReferences

bValidateUnloadedSoftActorReferences

#Overview

name: bValidateUnloadedSoftActorReferences

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 bValidateUnloadedSoftActorReferences is to control whether the editor loads packages to validate soft references to actors during deletion or renaming operations. This setting is primarily related to the asset management and referencing system in Unreal Engine.

Based on the callsites, this setting variable is used in the AssetTools module, specifically within the AssetRenameManager. It affects the behavior of functions responsible for loading referencing packages and gathering referencing objects during asset renaming operations.

The value of this variable is set in the BlueprintEditorProjectSettings class, which is a subclass of UDeveloperSettings. This suggests that it’s a project-wide setting that can be configured by developers in the project settings.

This variable interacts with other parts of the asset renaming process, particularly influencing whether packages are loaded to check for soft references to actors.

Developers must be aware that enabling this setting can significantly impact performance, especially in large projects. When enabled, it provides more thorough validation of soft actor references but at the cost of increased loading times during delete/rename operations.

Best practices for using this variable include:

  1. In smaller projects or during development phases where maintaining reference integrity is crucial, keep this setting enabled.
  2. In larger projects or when performance is a priority, consider disabling this setting to improve editor responsiveness.
  3. When disabled, be extra cautious when deleting or renaming actors, as it may break blueprints or sequences using soft actor references.
  4. Regularly test your project with both settings to ensure it functions correctly in both scenarios.
  5. Document your choice for this setting in your project’s development guidelines to ensure consistency across the team.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditor.ini:613, section: [/Script/UnrealEd.BlueprintEditorProjectSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Developer/AssetTools/Private/AssetRenameManager.cpp:838

Scope (from outer to inner):

file
function     void FAssetRenameManager::LoadReferencingPackages

Source code excerpt:

{
	const UBlueprintEditorProjectSettings* EditorProjectSettings = GetDefault<UBlueprintEditorProjectSettings>();
	bool bLoadPackagesForSoftReferences = EditorProjectSettings->bValidateUnloadedSoftActorReferences;
	bool bStartedSlowTask = false;
	const FText ReferenceUpdateSlowTask = LOCTEXT("ReferenceUpdateSlowTask", "Updating Asset References");

	ISourceControlProvider& SourceControlProvider = ISourceControlModule::Get().GetProvider();

	if (bCheckStatus)

#Loc: <Workspace>/Engine/Source/Developer/AssetTools/Private/AssetRenameManager.cpp:1009

Scope (from outer to inner):

file
function     void FAssetRenameManager::GatherReferencingObjects

Source code excerpt:

{
	const UBlueprintEditorProjectSettings* EditorProjectSettings = GetDefault<UBlueprintEditorProjectSettings>();
	bool bLoadPackagesForSoftReferences = EditorProjectSettings->bValidateUnloadedSoftActorReferences;

	TMap<UPackage*, TMap<FSoftObjectPath, FSoftObjectPath>> ReferencingPackages;

	for (int32 AssetIdx = 0; AssetIdx < AssetsToRename.Num(); ++AssetIdx)
	{
		FAssetRenameDataWithReferencers& RenameData = AssetsToRename[AssetIdx];

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Public/Settings/BlueprintEditorProjectSettings.h:29

Scope (from outer to inner):

file
class        class UBlueprintEditorProjectSettings : public UDeveloperSettings

Source code excerpt:

	/** If enabled, the editor will load packages to look for soft references to actors when deleting/renaming them. This can be slow in large projects so disable this to improve performance but increase the chance of breaking blueprints/sequences that use soft actor references */
	UPROPERTY(EditAnywhere, config, Category=Actors)
	uint8 bValidateUnloadedSoftActorReferences : 1;

	/**
	 * Enable the option to expand child actor components within component tree views (experimental).
	 */
	UPROPERTY(EditAnywhere, config, Category = Experimental)
	uint8 bEnableChildActorExpansionInTreeView : 1;