UContentBrowserDataSubsystem

Subsystem that provides access to Content Browser data.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

ContentBrowserData

Header

/Engine/Source/Editor/ContentBrowserData/Public/ContentBrowserDataSubsystem.h

Include

#include "ContentBrowserDataSubsystem.h"

Syntax

class UContentBrowserDataSubsystem :
    public UEditorSubsystem,
    public IContentBrowserItemDataSink

Remarks

Subsystem that provides access to Content Browser data. This type deals with the composition of multiple data sources, which provide information about the folders and files available in the Content Browser.

Functions

Name Description

Public function

void

 

ActivateAllDataSources()

Activate all available data sources.

Public function

bool

 

ActivateDataSource

(
    const FName Name
)

Attempt to activate the named data source.

Public function Const

bool

 

CanCreateFolder

(
    const FName InPath,
    FText* OutErrorMsg
)

Query whether a folder can be created at the given virtual path, optionally providing error information if it cannot.

Public function Const

void

 

CompileFilter

(
    const FName InPath,
    const FContentBrowserDataFilter& I...,
    FContentBrowserDataCompiledFilter&...
)

Take a raw data filter and convert it into a compiled version that could be re-used for multiple queries using the same data (typically this is only useful for post-filtering multiple items).

Public function

TArray< FStr...

 

ConvertInternalPathsToVirtual

(
    const TArray< FString >& InPaths
)

Public function

void

 

ConvertInternalPathToVirtual

(
    const FStringView InPath,
    FName& OutPath
)

Converts an internal path to a virtual path based on current rules

Public function

void

 

ConvertInternalPathToVirtual

(
    FName InPath,
    FName& OutPath
)

Converts an internal path to a virtual path.

Public function

FName

 

ConvertInternalPathToVirtual

(
    FName InPath
)

Converts an internal path to a virtual path.

Public function Const

FContentBrow...

 

CreateFolder

(
    const FName InPath
)

Attempt to begin the process of asynchronously creating a folder at the given virtual path, returning a temporary item that can be finalized or canceled by the user.

Public function

void

 

DeactivateAllDataSources()

Deactivate all active data sources.

Public function

bool

 

DeactivateDataSource

(
    const FName Name
)

Attempt to deactivate the named data source.

Public function Const

void

 

EnumerateItemsAtPath

(
    const FName InPath,
    const EContentBrowserItemTypeFilter...,
    TFunctionRef< bool...
)

Enumerate the items (folders and/or files) that exist at the given virtual path.

Public function Const

void

 

EnumerateItemsAtPath

(
    const FName InPath,
    const EContentBrowserItemTypeFilter...,
    TFunctionRef< bool...
)

Enumerate the items (folders and/or files) that exist at the given virtual path.

Public function Const

bool

 

EnumerateItemsAtPaths

(
    const TArrayView< class FContentBro...,
    const EContentBrowserItemTypeFilter...,
    TFunctionRef< bool...
)

Enumerate the items (files) that exist at the given paths.

Public function Const

bool

 

EnumerateItemsForObjects

(
    const TArrayView< UObject* > I...,
    TFunctionRef< bool...
)

Enumerate the items (files) that exist for the given objects.

Public function Const

void

 

EnumerateItemsMatchingFilter

(
    const FContentBrowserDataCompiledFi...,
    TFunctionRef< bool...
)

Enumerate the items (folders and/or files) that match a previously compiled filter.

Public function Const

void

 

EnumerateItemsMatchingFilter

(
    const FContentBrowserDataCompiledFi...,
    TFunctionRef< bool...
)

Enumerate the items (folders and/or files) that match a previously compiled filter.

Public function Const

void

 

EnumerateItemsUnderPath

(
    const FName InPath,
    const FContentBrowserDataFilter& I...,
    TFunctionRef< bool...
)

Enumerate the items (folders and/or files) that exist under the given virtual path.

Public function Const

void

 

EnumerateItemsUnderPath

(
    const FName InPath,
    const FContentBrowserDataFilter& I...,
    TFunctionRef< bool...
)

Enumerate the items (folders and/or files) that exist under the given virtual path.

Public function Const

TArray< FNam...

 

GetActiveDataSources()

Get the list of current active data sources.

Public function Const

const FStrin...

 

GetAllFolderPrefix()

Prefix to use when generating virtual paths and "Show All Folder" option is enabled

Public function Const

TArray< FNam...

 

GetAvailableDataSources()

Get the list of current available data sources.

Public function Const

const TArray...

 

GetDefaultPathViewSpecialSortFolders()

Returns reference to default list of paths that appear first in content browser based on internal or invariant paths

Public function Const

FContentBrow...

 

GetItemAtPath

(
    const FName InPath,
    const EContentBrowserItemTypeFilter...
)

Get the first item (folder and/or file) that exists at the given virtual path.

Public function Const

TArray< FCon...

 

GetItemsAtPath

(
    const FName InPath,
    const EContentBrowserItemTypeFilter...
)

Get the items (folders and/or files) that exist at the given virtual path.

Public function Const

TArray< FCon...

 

GetItemsUnderPath

(
    const FName InPath,
    const FContentBrowserDataFilter& I...
)

Get the items (folders and/or files) that exist under the given virtual path.

Public function Const

const TArray...

 

GetPathViewSpecialSortFolders()

Returns reference to list of paths that appear first in content browser based on internal or invariant paths

Public function Const

bool

 

IsDiscoveringItems

(
    TArray< FText >* OutStatus
)

Query whether any data sources are currently discovering content, and retrieve optional status messages that can be shown in the UI.

Public function Const

bool

 

IsFolderVisibleIfHidingEmpty

(
    const FName InPath
)

Query whether the given virtual folder should be visible if the UI is asking to hide empty content folders.

Public function

void

 

Legacy_TryConvertAssetDataToVirtualPaths

(
    const FAssetData& InAssetData,
    const bool InUseFolderPaths,
    TFunctionRef< bool)> InCallba...
)

Attempt to convert the given asset data to a virtual paths associated with the active data sources (callback will be called for each successful conversion).

Public function

void

 

Legacy_TryConvertPackagePathToVirtualPaths

(
    const FName InPackagePath,
    TFunctionRef< bool)> InCallba...
)

Attempt to convert the given package path to virtual paths associated with the active data sources (callback will be called for each successful conversion).

Public function

FContentBrow...

 

OnGenerateVirtualPathPrefix()

Delegate called to generate a virtual path. Can be set to override default behavior.

Public function

FOnContentBr...

 

OnItemDataDiscoveryComplete()

Delegate called when all active data sources have completed their initial content discovery scan.

Public function

FOnContentBr...

 

OnItemDataRefreshed()

Delegate called for wholesale item data updates from data sources that can't provide delta-updates, or when the set of active data sources is modified.

Public function

FOnContentBr...

 

OnItemDataUpdated()

Delegate called for incremental item data updates from data sources that can provide delta-updates.

Public function

bool

 

PrioritizeSearchPath

(
    const FName InPath
)

If possible, attempt to prioritize content discovery for the given virtual path.

Public function

void

 

RefreshVirtualPathTreeIfNeeded()

Rebuild the virtual path tree if rules have changed.

Public function

void

 

SetGenerateVirtualPathPrefixDelegate

(
    const FContentBrowserGenerateVirtua...
)

Set delegate used to generate a virtual path.

Public function

void

 

SetPathViewSpecialSortFolders

(
    const TArray< FName >& InSpecialSo...
)

Customize list of folders that appear first in content browser based on internal or invariant paths

Public function

void

 

SetVirtualPathTreeNeedsRebuild()

Call when rules of virtual path generation have changed beyond content browser settings.

Public function Const

EContentBrow...

 

TryConvertVirtualPath

(
    const FStringView InPath,
    FName& OutPath
)

Converts virtual path back into an internal or invariant path

Public function Const

EContentBrow...

 

TryConvertVirtualPath

(
    const FStringView InPath,
    FStringBuilderBase& OutPath
)

Converts virtual path back into an internal or invariant path

Public function Const

EContentBrow...

 

TryConvertVirtualPath

(
    const FStringView InPath,
    FString& OutPath
)

Converts virtual path back into an internal or invariant path

Public function Const

EContentBrow...

 

TryConvertVirtualPath

(
    const FName InPath,
    FName& OutPath
)

Converts virtual path back into an internal or invariant path

Public function Const

TArray< FStr...

 

TryConvertVirtualPathsToInternal

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

Returns array of paths converted to internal.

Overridden from USubsystem

Name Description

Public function Virtual

void

 

Deinitialize()

Implement this for deinitialization of instances of the system

Public function Virtual

void

 

Initialize

(
    FSubsystemCollectionBase& Collecti...
)

Implement this for initialization of instances of the system

Overridden from IContentBrowserItemDataSink

Name Description

Public function Virtual

void

 

ConvertInternalPathToVirtual

(
    const FStringView InPath,
    FStringBuilderBase& OutPath
)

Converts an internal path to a virtual path.

Typedefs

Name

Description

FNameToDataSourceMap