![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <AssetDataGathererPrivate.h>
Public Member Functions | |
| FFileReadScheduler (int32 InNumReadThreads, bool InGatherAssetPackageData, bool InGatherDependsData) | |
| ~FFileReadScheduler () | |
| bool | IsAssetPackageDataGatherEnabled () const |
| bool | IsDependsDataGatherEnabled () const |
| void | AddFile (const FName PackageName, FGatheredPathData &&AssetData) |
| void | WaitOnDirectoriesAndUpdateWaitList (FWaitBatchDirectorySet &WaitBatchDirectories) |
| void | Schedule (const TArray< FString > &PriorityDirectories) |
| void | CollectCompletedReads (TArray< TUniquePtr< FReadContext > > &OutReadyContexts) |
| void | RemoveScheduledDirectory (const FString &Directory) |
| void | ProcessReadContexts (TArray< TUniquePtr< UE::AssetDataGather::Private::FReadContext > > &&ReadContexts, bool bIsTimeSliced) |
| void | FreeReadTaskLoaders () |
| void | Shrink () |
Manages the scheduling of FReadContexts
| UE::AssetDataGather::Private::FFileReadScheduler::FFileReadScheduler | ( | int32 | InNumReadThreads, |
| bool | InGatherAssetPackageData, | ||
| bool | InGatherDependsData | ||
| ) |
| UE::AssetDataGather::Private::FFileReadScheduler::~FFileReadScheduler | ( | ) |
| void UE::AssetDataGather::Private::FFileReadScheduler::AddFile | ( | const FName | PackageName, |
| FGatheredPathData && | AssetData | ||
| ) |
Add file to be scheduled for reading asynchronously.
| void UE::AssetDataGather::Private::FFileReadScheduler::CollectCompletedReads | ( | TArray< TUniquePtr< FReadContext > > & | OutReadyContexts | ) |
Populates the provided array with all completed reads (completed means read context is no longer being processed. One must still check for success/failure/cancellation).
| void UE::AssetDataGather::Private::FFileReadScheduler::FreeReadTaskLoaders | ( | ) |
Releases all allocated read task loaders created during gathering. Must be called while gathering is not in progress.
|
inline |
Returns true if AssetPackageData should be gathered. Constant during threading.
|
inline |
Returns true if dependency data should be gathered. Constant during threading.
| void UE::AssetDataGather::Private::FFileReadScheduler::ProcessReadContexts | ( | TArray< TUniquePtr< UE::AssetDataGather::Private::FReadContext > > && | ReadContexts, |
| bool | bIsTimeSliced | ||
| ) |
Reads and stores gather results for asset files in the provided array. If time slicing is used this method may exit before all read contexts are processed, and if so, will mark unprocessed read contexts as cancelled so they may be rescheduled in another gatherer tick.
| void UE::AssetDataGather::Private::FFileReadScheduler::RemoveScheduledDirectory | ( | const FString & | Directory | ) |
Removes a scheduled directory from the scheduler. When all added files for a directory have been scheduled and completed, the directory should be removed to avoid overhead should a wait batch directory attempt to wait on the empty, still scheduled, directory.
| void UE::AssetDataGather::Private::FFileReadScheduler::Schedule | ( | const TArray< FString > & | PriorityDirectories | ) |
Schedules all added files since the last call to Schedule to be picked up by the task system such that up to NumReadTaskThreads normal priority tasks may be in-flight at once. Existing or newly added directories in the given list of PriorityDirectories will be scheduled immediately and not bound by the schedulers NumReadTaskThreads limit.
| void UE::AssetDataGather::Private::FFileReadScheduler::Shrink | ( | ) |
Frees unnecessary allocations the scheduler may have accrued.
| void UE::AssetDataGather::Private::FFileReadScheduler::WaitOnDirectoriesAndUpdateWaitList | ( | FWaitBatchDirectorySet & | WaitBatchDirectories | ) |
Schedule immediately and waits for all reads for the directories listed in WaitBatchDirectories. The list will be updated with all child directories waited on if the passed in directory was listed as recursive.