UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::AssetDataGather::Private::FGatherSettings Struct Reference

#include <AssetDataGathererPrivate.h>

Public Member Functions

void Initialize ()
 
bool IsAsyncEnabled () const
 
bool IsGatherCacheReadEnabled () const
 
bool IsGatherCacheWriteEnabled () const
 
bool IsDiscoveryCacheReadEnabled () const
 
EFeatureEnabled IsDiscoveryCacheWriteEnabled () const
 
bool IsDiscoveryCacheInvalidateEnabled () const
 
bool IsPreloadGatherCache () const
 
bool IsPreloadDiscoveryCache () const
 
bool IsGatherDependsData () const
 
bool IsForceDependsGathering () const
 
EEditorGameScanMode GetEditorGameScanMode () const
 
FString GetLegacyCacheFilename () const
 
FString GetLegacyNonMonolithicCacheDirectory () const
 
const FString & GetCacheBaseFilename () const
 
const FString & GetAssetRegistryCacheRootFolder () const
 
TArray< FString > FindShardedCacheFiles () const
 

Static Public Attributes

static constexpr int32 ExpectedMaxBatchSize = 100
 
static constexpr int32 MinSecondsToElapseBeforeCacheWrite = 300
 
static constexpr int32 MinAssetReadsBeforeCacheWrite = 100000
 
static constexpr int32 CacheShardAssetCount = 250000
 
static constexpr uint32 CacheSerializationMagic = 0x29FE48B0
 
static constexpr uint64 CurrentVersion = FAssetRegistryVersion::LatestVersion | (uint64(CacheSerializationMagic) << 32)
 
static const FTimespan CachePruneAge = FTimespan(7, 0, 0, 0)
 
static constexpr float PollDiscoveryPeriodSeconds = .005f
 
static int32 GARDiscoverThreads = 15
 
static int32 GARDiscoverMinBatchSize = 1
 
static int32 GARGatherThreads = 0
 
static int32 GARGatherCacheParallelism = 16
 

Detailed Description

Settings about whether to use cache data for the AssetDataGatherer; these settings are shared by FPreloader, FAssetDataGatherer, and FAssetDataDiscovery.

Member Function Documentation

◆ FindShardedCacheFiles()

TArray< FString > UE::AssetDataGather::Private::FGatherSettings::FindShardedCacheFiles ( ) const

◆ GetAssetRegistryCacheRootFolder()

const FString & UE::AssetDataGather::Private::FGatherSettings::GetAssetRegistryCacheRootFolder ( ) const
inline

◆ GetCacheBaseFilename()

const FString & UE::AssetDataGather::Private::FGatherSettings::GetCacheBaseFilename ( ) const
inline

◆ GetEditorGameScanMode()

EEditorGameScanMode UE::AssetDataGather::Private::FGatherSettings::GetEditorGameScanMode ( ) const
inline

◆ GetLegacyCacheFilename()

FString UE::AssetDataGather::Private::FGatherSettings::GetLegacyCacheFilename ( ) const
inline

◆ GetLegacyNonMonolithicCacheDirectory()

FString UE::AssetDataGather::Private::FGatherSettings::GetLegacyNonMonolithicCacheDirectory ( ) const
inline

◆ Initialize()

void UE::AssetDataGather::Private::FGatherSettings::Initialize ( )

◆ IsAsyncEnabled()

bool UE::AssetDataGather::Private::FGatherSettings::IsAsyncEnabled ( ) const
inline

◆ IsDiscoveryCacheInvalidateEnabled()

bool UE::AssetDataGather::Private::FGatherSettings::IsDiscoveryCacheInvalidateEnabled ( ) const
inline

◆ IsDiscoveryCacheReadEnabled()

bool UE::AssetDataGather::Private::FGatherSettings::IsDiscoveryCacheReadEnabled ( ) const
inline

◆ IsDiscoveryCacheWriteEnabled()

EFeatureEnabled UE::AssetDataGather::Private::FGatherSettings::IsDiscoveryCacheWriteEnabled ( ) const
inline

◆ IsForceDependsGathering()

bool UE::AssetDataGather::Private::FGatherSettings::IsForceDependsGathering ( ) const
inline

◆ IsGatherCacheReadEnabled()

bool UE::AssetDataGather::Private::FGatherSettings::IsGatherCacheReadEnabled ( ) const
inline

◆ IsGatherCacheWriteEnabled()

bool UE::AssetDataGather::Private::FGatherSettings::IsGatherCacheWriteEnabled ( ) const
inline

◆ IsGatherDependsData()

bool UE::AssetDataGather::Private::FGatherSettings::IsGatherDependsData ( ) const
inline

◆ IsPreloadDiscoveryCache()

bool UE::AssetDataGather::Private::FGatherSettings::IsPreloadDiscoveryCache ( ) const
inline

◆ IsPreloadGatherCache()

bool UE::AssetDataGather::Private::FGatherSettings::IsPreloadGatherCache ( ) const
inline

Member Data Documentation

◆ CachePruneAge

const FTimespan UE::AssetDataGather::Private::FGatherSettings::CachePruneAge = FTimespan(7, 0, 0, 0)
inlinestatic

◆ CacheSerializationMagic

constexpr uint32 UE::AssetDataGather::Private::FGatherSettings::CacheSerializationMagic = 0x29FE48B0
staticconstexpr

◆ CacheShardAssetCount

constexpr int32 UE::AssetDataGather::Private::FGatherSettings::CacheShardAssetCount = 250000
staticconstexpr

◆ CurrentVersion

constexpr uint64 UE::AssetDataGather::Private::FGatherSettings::CurrentVersion = FAssetRegistryVersion::LatestVersion | (uint64(CacheSerializationMagic) << 32)
staticconstexpr

◆ ExpectedMaxBatchSize

constexpr int32 UE::AssetDataGather::Private::FGatherSettings::ExpectedMaxBatchSize = 100
staticconstexpr

◆ GARDiscoverMinBatchSize

int32 UE::AssetDataGather::Private::FGatherSettings::GARDiscoverMinBatchSize = 1
inlinestatic

Minimum batch sized used used in the ParallelFor in FAssetDataDiscovery::TickInternal. In theory higher minimum values could reduce the cost of waking up workers, but in practice it does not have a significant effect.

◆ GARDiscoverThreads

int32 UE::AssetDataGather::Private::FGatherSettings::GARDiscoverThreads = 15
inlinestatic

The maximum number of threads used in the ParallelFor in FAssetDataDiscovery::TickInternal. Higher values cause more time spent waking up workers. Lower values cause more time spent running the DirectoryEnumeration on each thread. Current value was chosen based on experiments on an SSD drive with a warm disk cache.

◆ GARGatherCacheParallelism

int32 UE::AssetDataGather::Private::FGatherSettings::GARGatherCacheParallelism = 16
inlinestatic

The maximum number of the gatherer's cache files that can be loaded in parallel in LoadCacheFiles. The amount of memory used when reading the cache rises proportional to this value. Other than the memory cost, it should be set as high as possible to load the cache faster.

◆ GARGatherThreads

int32 UE::AssetDataGather::Private::FGatherSettings::GARGatherThreads = 0
inlinestatic

The maximum number of threads used in the ParallelFor around ReadAssetFile in FAssetDataGatherer::TickInternal. Very high numbers of threads does not reduce wall time of the gather because the threads become IO limited. Capping the number of threads allows those threads to be used in other async operations in Engine startup. A value of <= 0 will let the system decide how many threads to use.

◆ MinAssetReadsBeforeCacheWrite

constexpr int32 UE::AssetDataGather::Private::FGatherSettings::MinAssetReadsBeforeCacheWrite = 100000
staticconstexpr

◆ MinSecondsToElapseBeforeCacheWrite

constexpr int32 UE::AssetDataGather::Private::FGatherSettings::MinSecondsToElapseBeforeCacheWrite = 300
staticconstexpr

◆ PollDiscoveryPeriodSeconds

constexpr float UE::AssetDataGather::Private::FGatherSettings::PollDiscoveryPeriodSeconds = .005f
staticconstexpr

How long we wait on the gatherer thread between asking the discovery thread for no results.


The documentation for this struct was generated from the following files: