UEditorAssetLibrary

Utility class to do most of the common functionalities with the ContentBrowser.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

EditorScriptingUtilities

Header

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

Include

#include "EditorAssetLibrary.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class UEditorAssetLibrary : public UBlueprintFunctionLibrary

Remarks

Utility class to do most of the common functionalities with the ContentBrowser. The AssetRegistryHelpers class has more complex utilities. Use FindAssetData to get a FAssetData from an Asset Path. The Asset Path can be represented by ie. (Reference/Text Path) StaticMesh'/Game/MyFolder/MyAsset.MyAsset' ie. (Full Name) StaticMesh /Game/MyFolder/MyAsset.MyAsset ie. (Path Name) /Game/MyFolder/MyAsset.MyAsset ie. (Package Name) /Game/MyFolder/MyAsset The Directory Path can be represented by ie. /Game/MyNewFolder/ ie. /Game/MyNewFolder All operations can be slow. The editor should not be in play in editor mode. It will not work on assets of the type level.

Functions

Name Description

Public function Static UFunction BlueprintCallable, Category

bool

 

CheckoutAsset

(
    const FString& AssetToCheckout
)

Checkout the asset from the Content Browser.

Public function Static UFunction BlueprintCallable, Category

bool

 

CheckoutDirectory

(
    const FString& DirectoryPath,
    bool bRecursive
)

Checkout assets from the Content Browser.

Public function Static UFunction BlueprintCallable, Category

bool

 

CheckoutLoadedAsset

(
    UObject* AssetToCheckout
)

Checkout the asset from the Content Browser.

Public function Static UFunction BlueprintCallable, Category

bool

 

CheckoutLoadedAssets

(
    const TArray< UObject* >& Ass...
)

Checkout the assets from the Content Browser.

Public function Static UFunction BlueprintCallable, Category

bool

 

ConsolidateAssets

(
    UObject* AssetToConsolidateTo,
    const TArray< UObject* >& Ass...
)

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

Public function Static UFunction BlueprintCallable, Category

bool

 

DeleteAsset

(
    const FString& AssetPathToDelete
)

Delete the package the assets live in.

Public function Static UFunction BlueprintCallable, Category

bool

 

DeleteDirectory

(
    const FString& DirectoryPath
)

Delete the packages inside a directory.

Public function Static UFunction BlueprintCallable, Category

bool

 

DeleteLoadedAsset

(
    UObject* AssetToDelete
)

Delete an asset from the Content Browser that is already loaded.

Public function Static UFunction BlueprintCallable, Category

bool

 

DeleteLoadedAssets

(
    const TArray< UObject* >& Ass...
)

Delete assets from the Content Browser that are already loaded.

Public function Static UFunction BlueprintCallable, Category

bool

 

DoAssetsExist

(
    const TArray< FString >& AssetPath...
)

Check if the assets exist in the Content Browser.

Public function Static UFunction BlueprintCallable, Category

bool

 

DoesAssetExist

(
    const FString& AssetPath
)

Check if the asset exists in the Content Browser.

Public function Static UFunction BlueprintCallable, Category

bool

 

DoesDirectoryExist

(
    const FString& DirectoryPath
)

Check is the directory exist in the Content Browser. Directory operations

Public function Static UFunction BlueprintCallable, Category

bool

 

DoesDirectoryHaveAssets

(
    const FString& DirectoryPath,
    bool bRecursive
)

Check if there any asset that exist in the directory.

Public function Static UFunction BlueprintCallable, Category

UObject *...

 

DuplicateAsset

(
    const FString& SourceAssetPath,
    const FString& DestinationAssetPat...
)

Duplicate an asset from the Content Browser.

Public function Static UFunction BlueprintCallable, Category

bool

 

DuplicateDirectory

(
    const FString& SourceDirectoryPath,
    const FString& DestinationDirector...
)

Duplicate asset from the Content Browser that are in the folder.

Public function Static UFunction BlueprintCallable, Category

UObject *...

 

DuplicateLoadedAsset

(
    UObject* SourceAsset,
    const FString& DestinationAssetPat...
)

Duplicate an asset from the Content Browser that is already loaded. Will try to checkout the file.

Public function Static UFunction BlueprintCallable, Category

FAssetData

 

FindAssetData

(
    const FString& AssetPath
)

Return the AssetData for the Asset that can then be used with the more complex lib AssetRegistryHelpers.

Public function Static UFunction BlueprintCallable, Category

TArray< FStr...

 

FindPackageReferencersForAsset

(
    const FString& AssetPath,
    bool bLoadAssetsToConfirm
)

Find Package Referencers for an asset.

Public function Static UFunction BlueprintCallable, Category

FString

 

GetMetadataTag

(
    UObject* Object,
    FName Tag
)

Get the value associated with the given tag of a loaded asset's metadata.

Public function Static UFunction BlueprintCallable, Category

TMap< FName,...

 

GetMetadataTagValues

(
    UObject* Object
)

Get all tags/values of a loaded asset's metadata.

Public function Static UFunction BlueprintCallable, Category

FString

 

GetPathNameForLoadedAsset

(
    UObject* LoadedAsset
)

Return a valid AssetPath for a loaded asset.

Public function Static UFunction BlueprintCallable, Category

TMap< FName,...

 

GetTagValues

(
    const FString& AssetPath
)

Gets all TagValues (from Asset Registry) associated with an (unloaded) asset as strings value.

Public function Static UFunction BlueprintCallable, Category

TArray< FStr...

 

ListAssetByTagValue

(
    FName TagName,
    const FString& TagValue
)

Return the list of all the assets that have the pair of Tag/Value.

Public function Static UFunction BlueprintCallable, Category

TArray< FStr...

 

ListAssets

(
    const FString& DirectoryPath,
    bool bRecursive,
    bool bIncludeFolder
)

Return the list of all the assets found in the DirectoryPath. List operations

Public function Static UFunction BlueprintCallable, Category

UObject *...

 

LoadAsset

(
    const FString& AssetPath
)

Load an asset from the Content Browser.

Public function Static UFunction BlueprintCallable, Category

UClass *

 

LoadBlueprintClass

(
    const FString& AssetPath
)

Load a Blueprint asset from the Content Browser and return its generated class.

Public function Static UFunction BlueprintCallable, Category

bool

 

MakeDirectory

(
    const FString& DirectoryPath
)

Create the directory on disk and in the Content Browser.

Public function Static UFunction BlueprintCallable, Category

void

 

RemoveMetadataTag

(
    UObject* Object,
    FName Tag
)

Remove the given tag from a loaded asset's metadata.

Public function Static UFunction BlueprintCallable, Category

bool

 

RenameAsset

(
    const FString& SourceAssetPath,
    const FString& DestinationAssetPat...
)

Rename an asset from the Content Browser.

Public function Static UFunction BlueprintCallable, Category

bool

 

RenameDirectory

(
    const FString& SourceDirectoryPath,
    const FString& DestinationDirector...
)

Rename assets from the Content Browser that are in the folder.

Public function Static UFunction BlueprintCallable, Category

bool

 

RenameLoadedAsset

(
    UObject* SourceAsset,
    const FString& DestinationAssetPat...
)

Rename an asset from the Content Browser that is already loaded.

Public function Static UFunction BlueprintCallable, Category

bool

 

SaveAsset

(
    const FString& AssetToSave,
    bool bOnlyIfIsDirty
)

Save the packages the assets live in.

Public function Static UFunction BlueprintCallable, Category

bool

 

SaveDirectory

(
    const FString& DirectoryPath,
    bool bOnlyIfIsDirty,
    bool bRecursive
)

Save the packages the assets live in inside the directory.

Public function Static UFunction BlueprintCallable, Category

bool

 

SaveLoadedAsset

(
    UObject* AssetToSave,
    bool bOnlyIfIsDirty
)

Save the packages the assets live in.

Public function Static UFunction BlueprintCallable, Category

bool

 

SaveLoadedAssets

(
    const TArray< UObject* >& Ass...,
    bool bOnlyIfIsDirty
)

Save the packages the assets live in.

Public function Static UFunction BlueprintCallable, Category

void

 

SetMetadataTag

(
    UObject* Object,
    FName Tag,
    const FString& Value
)

Set the value associated with a given tag of a loaded asset's metadata.

Public function Static UFunction BlueprintCallable, Category

void

 

SyncBrowserToObjects

(
    const TArray< FString >& AssetPath...
)

Sync the Content Browser to the given asset(s)

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