UEditorAssetLibrary::ConsolidateAssets

Consolidates an asset by replacing all references/uses of the provided AssetsToConsolidate with references to AssetToConsolidateTo.

Windows
MacOS
Linux

References

Module

EditorScriptingUtilities

Header

/Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Public/EditorAssetLibrary.h

Include

#include "EditorAssetLibrary.h"

Source

/Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Private/EditorAssetLibrary.cpp

Syntax

[UFUNCTION](Programming/UnrealArchitecture/Reference/Functions)(BlueprintCallable, Category="Editor Scripting | Asset")
static bool ConsolidateAssets
(
    UObject * AssetToConsolidateTo,
    const TArray< UObject * > & AssetsToConsolidate
)

Remarks

Consolidates an asset by replacing all references/uses of the provided AssetsToConsolidate with references to AssetToConsolidateTo. This is useful when you want all references of assets to be replaced by a single asset. The function first attempts to directly replace all relevant references located within objects that are already loaded and in memory. Next, it deletes the AssetsToConsolidate, leaving behind object redirectors to AssetToConsolidateTo.

The AssetsToConsolidate are DELETED by this function.

Modified objects will be saved if the operation succeeds.

Returns

True if the operation succeeds.

Parameters

Parameter

Description

AssetToConsolidateTo

Asset to which all references of the AssetsToConsolidate will instead refer to after this operation completes.

AssetsToConsolidate

All references to these assets will be modified to reference AssetToConsolidateTo instead.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss