![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <AssetDataGatherer.h>
Inheritance diagram for FAssetDataGatherer:Static Public Member Functions | |
| static bool | IsVerseFile (FStringView FilePath) |
| static TConstArrayView< const TCHAR * > | GetVerseFileExtensions () |
| static bool | ReadAssetFile (FPackageReader &PackageReader, TArray< FAssetData * > &AssetDataList, FPackageDependencyData &DependencyData, TArray< FString > &CookedPackagesToLoadUponDiscovery, FPackageReader::EReadOptions Options) |
Async task for gathering asset data from from the file list in FAssetRegistry
| FAssetDataGatherer::FAssetDataGatherer | ( | UAssetRegistryImpl & | InRegistryImpl | ) |
|
virtual |
| void FAssetDataGatherer::AddMountPoint | ( | FStringView | LocalPath, |
| FStringView | LongPackageName | ||
| ) |
Add a mountpoint to the gatherer after it has been registered with FPackageName .
| void FAssetDataGatherer::AddRequiredMountPoints | ( | TArrayView< FString > | LocalPaths | ) |
Add MountPoints in LocalPaths to the gatherer.
| void FAssetDataGatherer::ClearCache | ( | ) |
Empty the cache read from disk and the cache used to write to disk. Disable further caching. Used to save memory when cooking after the scan is complete.
| void FAssetDataGatherer::EnsureCompletion | ( | ) |
Signals to end the thread and waits for it to close before returning
| SIZE_T FAssetDataGatherer::GetAllocatedSize | ( | ) | const |
Return the memory used by the gatherer. Used for performance metrics.
| void FAssetDataGatherer::GetAndTrimSearchResults | ( | UE::AssetDataGather::FResults & | InOutResults, |
| UE::AssetDataGather::FResultContext & | OutContext | ||
| ) |
Gets search results from the data gatherer.
| FAssetGatherDiagnostics FAssetDataGatherer::GetDiagnostics | ( | ) |
Get diagnostics for telemetry or logging.
|
inline |
Returns reference to delegate invoked when search results have been gathered in GetAndTrimSearchResults.
| void FAssetDataGatherer::GetPackageResults | ( | UE::AssetDataGather::FResults & | InOutResults | ) |
Gets just the Assets, AssetsForGameThread, Dependencies, and DependenciesForGameThread from the data gatherer.
|
static |
Return the list of extensions that indicate verse files.
| bool FAssetDataGatherer::HasSerializedDiscoveryCache | ( | ) | const |
Returns true if the asset registry has written out the discovery cache after discovery has completed. This function will return false if discovery is not yet complete, discovery caching isn't supported by the current platform or cache writing has been disabled such as when using -NoAssetRegistryCacheWrite.
| bool FAssetDataGatherer::IsAsyncEnabled | ( | ) | const |
| bool FAssetDataGatherer::IsCacheReadEnabled | ( | ) | const |
Return whether the current process enables reading AssetDataGatherer cache files.
| bool FAssetDataGatherer::IsCacheWriteEnabled | ( | ) | const |
Return whether the current process enables writing AssetDataGatherer cache files.
| bool FAssetDataGatherer::IsComplete | ( | ) | const |
Report whether all monitored assets have been added to search results, AND these results have been gathered through a GetAndTrimSearchResults call. This function can be used to check whether there is any work to be done on the gatherer.
| bool FAssetDataGatherer::IsGatheringDependencies | ( | ) | const |
Report whether the gatherer is configured to load depends data in addition to asset data.
|
inline |
| bool FAssetDataGatherer::IsMonitored | ( | FStringView | LocalPath | ) | const |
Report whether the path is both in the allow list and not in the deny list.
| bool FAssetDataGatherer::IsOnAllowList | ( | FStringView | LocalPath | ) | const |
Report whether the path is in the allow list. Only paths in AllowList AND not in DenyList will be scanned.
| bool FAssetDataGatherer::IsOnDenyList | ( | FStringView | LocalPath | ) | const |
Report whether the path is in the deny list. Paths in DenyList are not scanned.
|
inline |
| bool FAssetDataGatherer::IsSynchronous | ( | ) | const |
|
static |
Determine, based on the file extension, if the given file path is a Verse file
| void FAssetDataGatherer::OnAdditionalMountSearchCompleted | ( | ) |
| void FAssetDataGatherer::OnDirectoryCreated | ( | FStringView | LocalPath | ) |
Called from DirectoryWatcher. Update the directory for reporting in future search results.
| void FAssetDataGatherer::OnFilesCreated | ( | TConstArrayView< FString > | LocalPaths | ) |
Called from DirectoryWatcher. Update the files for reporting in future search results.
| void FAssetDataGatherer::OnInitialSearchCompleted | ( | ) |
|
inline |
Callable by the main thread to request that this thread pause/resume processing data. Gathering can still proceed during this time.
| void FAssetDataGatherer::PrioritizeSearchPath | ( | const FString & | PathToPrioritize | ) |
Mark a file or directory to be scanned before unprioritized assets.
|
static |
Reads FAssetData information out of a previously initialized package reader
| PackageReader | the previously opened package reader |
| AssetDataList | the FAssetData for every asset found in the file |
| DependencyData | the FPackageDependencyData for every asset found in the file |
| CookedPackagesToLoadUponDiscovery | the list of cooked packages to be loaded if any |
| Options | Which bits of data to read |
| void FAssetDataGatherer::RemoveMountPoint | ( | FStringView | LocalPath | ) |
Remove a previously added mountpoint.
|
inline |
|
inline |
|
overridevirtual |
| void FAssetDataGatherer::ScanPathsSynchronous | ( | const TArray< FString > & | InPaths, |
| bool | bForceRescan, | ||
| bool | bIgnoreDenyListScanFilters | ||
| ) |
Add a set of paths to the allow list, optionally force rescanning and ignore deny list on them, and wait for all assets in the paths to be added to search results. Wait time is minimized by prioritizing the paths and transferring async scanning to the current thread.
| void FAssetDataGatherer::SetInitialPluginsLoaded | ( | ) |
Set after initial plugins have loaded and we should not retry failed loads with missing custom versions.
| void FAssetDataGatherer::SetIsOnAllowList | ( | FStringView | LocalPath, |
| bool | bIsAllowed | ||
| ) |
Mark whether a given path is in the scanning allow list.
By default no paths are scanned; adding a path to the allow list causes it and its subdirectories to be scanned. Note that the deny list (InLongPackageNameDenyList) overrides the allow list. Allow list settings are recursive. Attempting to mark a path as allowed if a parent path is on the allow list will have no effect. This means the scenario ((1) add allow list A (2) add allow list A/Child (3) remove allow list A) will therefore not result in A/Child being allowed.
| void FAssetDataGatherer::StartAsync | ( | ) |
Start the async thread, if this Gatherer was created async. Does nothing if not async or already started.
| void FAssetDataGatherer::UpdateCacheForSaving | ( | ) |
Update the the Gatherer's cache using in-memory state information before serializing. This method must be called while owning the InterfaceLock.
Wait for all monitored assets to be added to search results.
| void FAssetDataGatherer::WaitOnPath | ( | FStringView | LocalPath | ) |
Wait for all monitored assets under the given path to be added to search results. Returns immediately if the given path is not monitored.