Navigation
API > API/Editor > API/Editor/UnrealEd
UEditorAssetSubsystem Subsystem for exposing asset related utilities to scripts. Asset Paths can be represented in the following ways: (Reference/Text Path) StaticMesh'/Game/MyFolder/MyAsset.MyAsset' (Full Name) StaticMesh /Game/MyFolder/MyAsset.MyAsset (Path Name) /Game/MyFolder/MyAsset.MyAsset (Package Name) /Game/MyFolder/MyAsset Directory Paths can be represented in the following ways: /Game/MyNewFolder/ /Game/MyNewFolder
| Name | UEditorAssetSubsystem |
| Type | class |
| Header File | /Engine/Source/Editor/UnrealEd/Public/Subsystems/EditorAssetSubsystem.h |
| Include Path | #include "Subsystems/EditorAssetSubsystem.h" |
Syntax
UCLASS (MinimalAPI)
class UEditorAssetSubsystem : public UEditorSubsystem
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UDynamicSubsystem → UEditorSubsystem → UEditorAssetSubsystem
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UEditorAssetSubsystem() |
Subsystems/EditorAssetSubsystem.h |
Classes
| Name | Remarks |
|---|---|
| FOnExtractAssetFromFileDynamic | Dynamic version of FOnExtractAssetFromFile. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnExtractAssetFromFile | TMulticastDelegate_TwoParams< void, const TArray< FString > &Files, TArray< FAssetData > &AssetDataArray > | Delegate for extracting an asset from a file, for example from a drag and drop operation. | Subsystems/EditorAssetSubsystem.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnExtractAssetFromFile | FOnExtractAssetFromFile | Delegate for extracting an asset from a file, for example from a drag and drop operation. | Subsystems/EditorAssetSubsystem.h | |
| OnExtractAssetFromFileDynamicArray | TArray< FOnExtractAssetFromFileDynamic > | Array of dynamic delegates for extracting an asset from a file. | Subsystems/EditorAssetSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddOnExtractAssetFromFile
(
FOnExtractAssetFromFileDynamic Delegate |
Call this to add a callback to extract an asset from a file, for example from a drag and drop operation. | Subsystems/EditorAssetSubsystem.h |
|
bool CheckoutAsset
(
const FString& AssetToCheckout |
Checkout an asset. | Subsystems/EditorAssetSubsystem.h |
|
bool CheckoutDirectory
(
const FString& DirectoryPath, |
Checkout all assets in a directory. | Subsystems/EditorAssetSubsystem.h |
|
bool CheckoutLoadedAsset
(
UObject* AssetToCheckout |
Checkout the asset corresponding to an object. | Subsystems/EditorAssetSubsystem.h |
|
| Checkout the assets. | Subsystems/EditorAssetSubsystem.h |
|
|
bool ConsolidateAssets
(
UObject* AssetToConsolidateTo, |
Consolidates assets by replacing all references/uses of the provided AssetsToConsolidate with references to AssetToConsolidateTo. | Subsystems/EditorAssetSubsystem.h |
|
virtual void Deinitialize() |
Subsystems/EditorAssetSubsystem.h | ||
bool DeleteAsset
(
const FString& AssetPathToDelete |
Delete the package an asset is in. | Subsystems/EditorAssetSubsystem.h |
|
bool DeleteDirectory
(
const FString& DirectoryPath |
Delete the packages inside a directory. | Subsystems/EditorAssetSubsystem.h |
|
bool DeleteLoadedAsset
(
UObject* AssetToDelete |
Delete an asset that is already loaded. | Subsystems/EditorAssetSubsystem.h |
|
bool DeleteLoadedAssets
(
const TArray< UObject* >& AssetsToDelete |
Delete assets that are already loaded. | Subsystems/EditorAssetSubsystem.h |
|
| Check if assets exist in the Asset Registry. | Subsystems/EditorAssetSubsystem.h |
|
|
bool DoesAssetExist
(
const FString& AssetPath |
Check if an asset exists in the Asset Registry. | Subsystems/EditorAssetSubsystem.h |
|
bool DoesDirectoryContainAssets
(
const FString& DirectoryPath, |
Check if a directory contains any assets. | Subsystems/EditorAssetSubsystem.h |
|
bool DoesDirectoryExist
(
const FString& DirectoryPath |
Check if a directory exists. | Subsystems/EditorAssetSubsystem.h |
|
UObject * DuplicateAsset
(
const FString& SourceAssetPath, |
Duplicate an asset. | Subsystems/EditorAssetSubsystem.h |
|
bool DuplicateDirectory
(
const FString& SourceDirectoryPath, |
Duplicate a directory and the assets in it. | Subsystems/EditorAssetSubsystem.h |
|
| Duplicate an asset that is already loaded. Will try to checkout the file. | Subsystems/EditorAssetSubsystem.h |
|
|
FAssetData FindAssetData
(
const FString& AssetPath |
Return the AssetData for the Asset that can then be used with AssetRegistryHelpers. | Subsystems/EditorAssetSubsystem.h |
|
TArray< FString > FindPackageReferencersForAsset
(
const FString& AssetPath, |
Find Package Referencers for an asset. | Subsystems/EditorAssetSubsystem.h |
|
TArray< FAssetData > GetAllAssetsByMetaDataTags
(
const TSet< FName >& RequiredTags, |
Gets all assets which have the given tags. | Subsystems/EditorAssetSubsystem.h |
|
int32 GetAssetFilenameLengthForCooking
(
const FString& AssetPath |
Returns the length of the computed cooked package name and path | Subsystems/EditorAssetSubsystem.h |
|
int32 GetLoadedAssetFilenameLengthForCooking
(
const UObject* Asset |
Returns the length of the computed cooked package name and path | Subsystems/EditorAssetSubsystem.h |
|
| Get the value associated with the given tag of a loaded asset's metadata. | Subsystems/EditorAssetSubsystem.h |
|
|
| Get all tags/values of a loaded asset's metadata. | Subsystems/EditorAssetSubsystem.h |
|
|
FOnExtractAssetFromFile & GetOnExtractAssetFromFile () |
Get the delegate for extracting an asset from a file, for example from a drag and drop operation. | Subsystems/EditorAssetSubsystem.h | |
FString GetPathNameForLoadedAsset
(
UObject* LoadedAsset |
Return a valid AssetPath for a loaded asset. | Subsystems/EditorAssetSubsystem.h |
|
| Gets all TagValues (from Asset Registry) associated with an (unloaded) asset as strings value. | Subsystems/EditorAssetSubsystem.h |
|
|
virtual void Initialize
(
FSubsystemCollectionBase& Collection |
Subsystems/EditorAssetSubsystem.h | ||
| Return the list of all the assets found in the DirectoryPath. | Subsystems/EditorAssetSubsystem.h |
|
|
| Return the list of all the assets that have the pair of Tag/Value. | Subsystems/EditorAssetSubsystem.h |
|
|
| Load an asset. It will verify if the object is already loaded and only load it if it's necessary. | Subsystems/EditorAssetSubsystem.h |
|
|
UClass * LoadBlueprintClass
(
const FString& AssetPath |
Load a Blueprint asset and return its generated class. | Subsystems/EditorAssetSubsystem.h |
|
bool MakeDirectory
(
const FString& DirectoryPath |
Create a directory on disk. | Subsystems/EditorAssetSubsystem.h |
|
| Remove the given tag from a loaded asset's metadata. | Subsystems/EditorAssetSubsystem.h |
|
|
void RemoveOnExtractAssetFromFile
(
FOnExtractAssetFromFileDynamic Delegate |
Call this to remove a callback added with AddOnExtractAssetFromFile. | Subsystems/EditorAssetSubsystem.h |
|
bool RenameAsset
(
const FString& SourceAssetPath, |
Rename an asset. | Subsystems/EditorAssetSubsystem.h |
|
bool RenameDirectory
(
const FString& SourceDirectoryPath, |
Rename a directory. | Subsystems/EditorAssetSubsystem.h |
|
bool RenameLoadedAsset
(
UObject* SourceAsset, |
Rename an asset that is already loaded. | Subsystems/EditorAssetSubsystem.h |
|
| Save the packages the assets live in. | Subsystems/EditorAssetSubsystem.h |
|
|
bool SaveDirectory
(
const FString& DirectoryPath, |
Save the packages the assets live in inside the directory. | Subsystems/EditorAssetSubsystem.h |
|
bool SaveLoadedAsset
(
UObject* AssetToSave, |
Save the package the asset lives in. | Subsystems/EditorAssetSubsystem.h |
|
bool SaveLoadedAssets
(
const TArray< UObject* >& AssetsToSave, |
Save the packages the assets live in. | Subsystems/EditorAssetSubsystem.h |
|
bool SetDirtyFlag
(
UObject* Object, |
Set the package dirty flag for an asset | Subsystems/EditorAssetSubsystem.h |
|
| Set the value associated with a given tag of a loaded asset's metadata. | Subsystems/EditorAssetSubsystem.h |
|
|
bool SortByMetaData
(
TArray< FAssetData >& Assets, |
Sorts the assets based on their meta data's type. | Subsystems/EditorAssetSubsystem.h |
|