UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AssetDataGathererPrivate.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "AssetDataGatherer.h"
6
8#include "Containers/Set.h"
10#include "Misc/Optional.h"
11#include "Misc/StringBuilder.h"
13#include "Templates/UniquePtr.h"
14
15#include <atomic>
16
18{
19
20class FMountDir;
21struct FScanDirAndParentData;
22
24enum class EPriority : uint8
25{
29 High,
31 Normal,
32
34 Lowest = Normal,
35};
36
63
73
74bool IsVerseFile(const EGatherableFileType FileType);
75
105
135
138{
140 : UnblockRead(TEXT("UnblockingDirectoryReadTaskEvent"))
142 {
143 }
144
146 {
147 // We can verify that we properly signaled our task, but we cannot verify that the ReadTask is complete,
148 // because it is possible that we insert the last outstanding read from the task and then process and remove
149 // our DirectoryReadTaskData before the task can complete. However we can verify there is no outstanding work.
152 }
153
158 bool bHasCanceledRead = false;
159};
160
196
199{
200public:
203
207 bool IsDependsDataGatherEnabled() const;
209 void AddFile(const FName PackageName, FGatheredPathData&& AssetData);
220 void Schedule(const TArray<FString>& PriorityDirectories);
230 void RemoveScheduledDirectory(const FString& Directory);
241 void FreeReadTaskLoaders();
243 void Shrink();
244private:
249 void ScheduleDirectory(UE::Tasks::FTaskConcurrencyLimiter& TaskLimiter, const FString& DirectoryPath,
251
253 TMap<FString, TArray<TUniquePtr<FReadContext>>> DirectoryReadsToSchedule;
259 UE::Tasks::FTaskConcurrencyLimiter ReadConcurrencyLimiter;
270 int32 NumReadTaskThreads;
272 bool bGatherAssetPackageData;
274 bool bGatherDependsData;
275};
276
279{
280public:
282 void AddPriorityFile(FGatheredPathData&& FilePath);
284 void AddFiles(TArray<FGatheredPathData>&& FilePaths);
294
296 template <typename AllocatorType>
298
304
306
308 int32 NumBlockingFiles() const;
309
311 void Shrink();
313 int32 Num() const;
315 int32 GetNumAvailable() const;
317 SIZE_T GetAllocatedSize() const;
318private:
319 TRingBuffer<FString> PriorityDirectories;
323 int32 AvailableFilesNum = 0;
324};
325
326
329{
338
340 const FString& GetLocalAbsPath() const;
341 EType GetType();
343 bool IsReadOnly();
344
347
349 void LoadExistenceData();
350 bool HasExistenceData() const;
351 void SetConfirmedExists(bool bValue);
352
353private:
354 FString LocalAbsPath;
355 FDateTime ModificationTime;
357 bool bIsReadOnly = false;
358 bool bHasExistenceData = false;
359};
360
369{
370public:
373 {
374 FInherited() = default;
375
377 bool bIsOnAllowList = false;
379 bool bMatchesDenyList = false;
381 bool bIgnoreDenyList = false;
382
383 bool IsMonitored() const;
384 bool IsOnDenyList() const;
385 bool IsOnAllowList() const;
386 bool HasSetting() const;
388 };
389
391 ~FScanDir();
392
397 void Shutdown();
398
400 bool IsValid() const;
401
402 FMountDir* GetMountDir() const;
403
405 FStringView GetRelPath() const;
406
410 FString GetLocalAbsPath() const;
414 FString GetMountRelPath() const;
415
420 void GetMonitorData(FStringView InRelPath, const FInherited& ParentData, FInherited& OutData) const;
422 bool IsMonitored(const FInherited& ParentData) const;
423
425 bool ShouldScan(const FInherited& ParentData) const;
427 bool HasScanned() const;
429 bool IsComplete() const;
430
432 SIZE_T GetAllocatedSize() const;
438 FScanDir* GetControllingDir(FStringView InRelPath, bool bIsDirectory, const FInherited& ParentData,
439 FInherited& OutData, FString& OutRelPath);
440
453
458 void SetScanResults(FStringView LocalAbsPath, const FInherited& ParentData,
465
467
469 bool IsScanInFlight() const;
476 bool IsScanInFlightInvalidated() const;
482
484 void MarkDirty(bool bMarkDescendents);
485
487 void Shrink();
488
489protected:
490
496 void SetComplete(bool bInIsComplete);
501 bool HasPersistentSettings() const;
502
513
516
518 template <typename CallbackType> void ForEachSubDir(const CallbackType& Callback);
524 template <typename CallbackType> void ForEachDescendent(const CallbackType& Callback);
525
528 FMountDir* MountDir = nullptr;
529 FScanDir* Parent = nullptr;
530 FString RelPath;
533 bool bHasScanned = false;
534 bool bScanInFlight = false;
536 bool bIsComplete = false;
537};
538
548
559{
560public:
562 ~FMountDir();
563
568
571
574 FString& OutRelPath);
576 SIZE_T GetAllocatedSize() const;
577
579 bool IsComplete() const;
580
588
589 /*
590 * Set values of fields on the given directory for all of the properties existing on InProperties.
591 */
595 bool* bOutMadeChanges = nullptr);
598
600
604 void Shrink();
605
621 FMountDir* GetParentMount() const;
624
625protected:
627 void UpdateDenyList();
630
637
663};
664
668{
669public:
671 virtual ~FAssetDataDiscovery();
672
673
674 // Controlling Async behavior
675
677 void StartAsync();
678
679 // FRunnable implementation
680 virtual bool Init() override;
681 virtual uint32 Run() override;
682 virtual void Stop() override;
683 virtual void Exit() override;
684
686 void EnsureCompletion();
687
688 bool IsSynchronous() const;
689
690 // Receiving Results and reading properties (possibly while tick is running)
698 void WaitForIdle(double EndTimeSeconds);
699 bool IsIdle() const;
702
705 bool bIgnoreDenyListScanFilters);
707 bool IsOnAllowList(FStringView LocalAbsPath) const;
709 bool IsOnDenyList(FStringView LocalAbsPath) const;
711 bool IsMonitored(FStringView LocalAbsPath) const;
713 bool IsCacheWriteEnabled() const;
715 SIZE_T GetAllocatedSize() const;
716
717 // Events and setting of properties (possibly while tick is running)
722 void AddMountPoint(const FString& LocalAbsPath, FStringView LongPackageName, bool& bOutAlreadyExisted);
724 void RemoveMountPoint(const FString& LocalAbsPath);
726 void PrioritizeSearchPath(const FString& LocalAbsPath, EPriority Priority);
728 void TrySetDirectoryProperties(const FString& LocalAbsPath, const FSetPathProperties& Properties,
729 bool bConfirmedExists);
731 void OnDirectoryCreated(FStringView LocalAbsPath);
734
735private:
737 FMountDir* FindContainingMountPoint(FStringView LocalAbsPath);
738 const FMountDir* FindContainingMountPoint(FStringView LocalAbsPath) const;
740 FMountDir* FindMountPoint(FStringView LocalAbsPath);
745 FMountDir& FindOrAddMountPoint(FStringView LocalAbsPath, FStringView LongPackageName);
747 int32 FindLowerBoundMountPoint(FStringView LocalAbsPath) const;
748
750 void TickInternal(bool bTickAll);
754 void SetIsIdle(bool bInIdle);
755 void SetIsIdle(bool bInIdle, double& TickStartTime);
756
758 void AddDiscovered(FStringView DirAbsPath, FStringView DirPackagePath, TConstArrayView<FDiscoveredPathData> SubDirs,
761 void AddDiscoveredFile(FDiscoveredPathData&& File);
762
768 static EGatherableFileType GetFileType(FStringView FilePath);
769
771 void OnFileCreated(const FString& LocalPaths);
773 void TrySetDirectoryPropertiesInternal(FPathExistence& QueryPath, const FSetPathProperties& Properties);
774
776 void AddMountPointInternal(const FString& LocalAbsPath, FStringView LongPackageName, bool& bOutAlreadyExisted);
778 void RemoveMountPointInternal(const FString& LocalAbsPath);
779
781 void Shrink();
782
784 struct FScopedPause
785 {
786 FScopedPause(const FAssetDataDiscovery& InOwner);
787 ~FScopedPause();
788 const FAssetDataDiscovery& Owner;
789 };
790
791private:
796 mutable FGathererCriticalSection TreeLock;
801 mutable FThreadOwnerSection TickOwner;
806 mutable FGathererCriticalSection ResultsLock;
807
808
809 // Variable section for variables that are constant during threading.
810
812 TArray<FString> LongPackageNamesDenyList;
814 TArray<FString> MountRelativePathsDenyList;
816 FRunnableThread* Thread;
821 bool bAsyncEnabled;
822
823
824 // Variable section for variables that are atomics read/writable from outside critical sections.
825
830 std::atomic<bool> bIsIdle;
835 std::atomic<bool> bPriorityDirty;
837 std::atomic<uint32> IsStopped;
839 mutable std::atomic<uint32> IsPaused;
844 FThreadSafeCounter NumDirectoriesToScan;
846 FEventRef PriorityDataUpdated{ EEventMode::ManualReset };
847
848 // Variable section for variables that are read/writable only within ResultsLock.
849
851 TArray<FString> DiscoveredDirectories;
852
854 struct FDirectoryResult
855 {
857 FString DirAbsPath;
859 SIZE_T GetAllocatedSize() const;
860 };
861 TArray<FDirectoryResult> DiscoveredFiles;
862 TArray<FGatheredPathData> DiscoveredSingleFiles;
864 double CurrentDiscoveryTime = 0.;
866 int32 NumDiscoveredFiles = 0;
868 int32 CumulativeDiscoveredFiles = 0;
870 float CumulativeDiscoveryTime = 0.f;
872 int32 NumCachedDirectories = 0;
874 int32 NumUncachedDirectories = 0;
875
876 // Variable section for variables that are read/writable only within TreeLock.
877
884
886 struct FPriorityScanDirData
887 {
889 FScanDir::FInherited ParentData;
890 int32 RequestCount = 0;
895 bool bReleaseWhenComplete = false;
896 };
897 TArray<FPriorityScanDirData> PriorityScanDirs;
898
899 // Variable section for variables that are read/writable only by the TickOwner thread
900
902 struct FDirToScanData
903 {
905 FScanDir::FInherited ParentData;
906 // This type is used in a TArray, and TArray assumes elements can be memmoved.
907 // TStringBuilder<N> cannot be memmoved, so use FStringBuilderBase without a buffer.
908 FStringBuilderBase DirLocalAbsPath;
909 FStringBuilderBase DirLongPackageName;
910 TArray<FDiscoveredPathData> IteratedSubDirs;
911 TArray<FDiscoveredPathData> IteratedFiles;
912 int32 NumIteratedDirs = 0;
913 int32 NumIteratedFiles = 0;
914 bool bScanned = false;
915
916 void Reset();
917 SIZE_T GetAllocatedSize() const;
918 };
919 TArray<FDirToScanData> DirToScanDatas;
920
922 struct FDirToScanBuffer
923 {
924 bool bAbort = false;
925
926 void Reset();
927 };
928 TArray<FDirToScanBuffer> DirToScanBuffers;
929
931
932 friend class FMountDir;
933 friend class FScanDir;
934};
935
940{
941 Sync,
942 Async,
943 None
944};
945
951{
952public:
953 static constexpr int32 ExpectedMaxBatchSize = 100;
955 static constexpr int32 MinAssetReadsBeforeCacheWrite = 100000;
956 static constexpr int32 CacheShardAssetCount = 250000;
957 static constexpr uint32 CacheSerializationMagic = 0x29FE48B0; // Versioning and integrity checking
959 static inline const FTimespan CachePruneAge = FTimespan(7, 0, 0, 0);
960
962 static constexpr float PollDiscoveryPeriodSeconds = .005f;
963
969 static inline int32 GARDiscoverThreads = 15;
981 static inline int32 GARGatherThreads = 0;
982
989
990 void Initialize();
991 bool IsAsyncEnabled() const;
992 bool IsGatherCacheReadEnabled() const;
993 bool IsGatherCacheWriteEnabled() const;
994 bool IsDiscoveryCacheReadEnabled() const;
997 bool IsPreloadGatherCache() const;
998 bool IsPreloadDiscoveryCache() const;
999 bool IsGatherDependsData() const;
1000 bool IsForceDependsGathering() const;
1002 FString GetLegacyCacheFilename() const;
1004 const FString& GetCacheBaseFilename() const;
1005 const FString& GetAssetRegistryCacheRootFolder() const;
1007
1008private:
1009 FString CacheBaseFilename;
1010 FString AssetRegistryCacheRootFolder;
1011 bool bForceDependsGathering = false;
1012 bool bGatherDependsData = false;
1013 bool bGatherCacheReadEnabled = false;
1014 bool bGatherCacheWriteEnabled = false;
1015 bool bDiscoveryCacheReadEnabled = false;
1016 EFeatureEnabled DiscoveryCacheWriteEnabled = EFeatureEnabled::Never;
1017 bool bDiscoveryCacheInvalidateEnabled = false;
1018 bool bPreloadGatherCache = false;
1019 bool bAsyncEnabled = false;
1020 bool bInitialized = false;
1022};
1024
1026bool DoesPathContainInvalidCharacters(const EGatherableFileType FileType, FStringView FilePath);
1027
1029// Inline implementations
1031
1033{
1034 return bAsyncEnabled;
1035}
1036
1038{
1039 return bGatherCacheReadEnabled;
1040}
1041
1043{
1044 return bGatherCacheWriteEnabled;
1045}
1046
1048{
1049 return bDiscoveryCacheReadEnabled;
1050}
1051
1053{
1054 return DiscoveryCacheWriteEnabled;
1055}
1056
1058{
1059 return bDiscoveryCacheInvalidateEnabled;
1060}
1061
1063{
1064 return bGatherCacheReadEnabled && bPreloadGatherCache;
1065}
1066
1068{
1069 return IsDiscoveryCacheReadEnabled() && bPreloadGatherCache;
1070}
1071
1073{
1074 return bGatherDependsData;
1075}
1076
1078{
1079 return bForceDependsGathering;
1080}
1081
1083{
1084 return EditorGameScanMode;
1085}
1086
1088{
1089 return CacheBaseFilename + TEXT(".bin");
1090}
1091
1093{
1094 return GetAssetRegistryCacheRootFolder() / TEXT("AssetRegistryCache");
1095}
1096
1097inline const FString& FGatherSettings::GetCacheBaseFilename() const
1098{
1099 return CacheBaseFilename;
1100}
1101
1103{
1104 return AssetRegistryCacheRootFolder;
1105}
1107{
1108 return bGatherAssetPackageData;
1109}
1111{
1112 return bGatherDependsData;
1113}
1114} // namespace UE::AssetDataGather::Private
#define check(expr)
Definition AssertionMacros.h:314
FCriticalSection FGathererCriticalSection
Definition AssetDataGatherer.h:94
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Event.h:135
Definition NameTypes.h:617
Definition PackageDependencyData.h:12
Definition RefCounting.h:213
Definition RunnableThread.h:20
Definition Runnable.h:20
Definition CriticalSectionQueryable.h:116
Definition ThreadSafeCounter.h:14
Definition ArrayView.h:139
Definition Array.h:670
Definition LockFreeList.h:910
Definition UnrealString.h.inl:34
Definition MpscQueue.h:18
Definition RefCounting.h:454
Definition RingBuffer.h:135
Definition SharedPointer.h:692
Definition UniquePtr.h:107
Definition AssetDataGathererDiscoveryCache.h:132
Definition AssetDataGathererPrivate.h:668
bool IsOnAllowList(FStringView LocalAbsPath) const
Definition AssetDataGatherer.cpp:2832
bool IsMonitored(FStringView LocalAbsPath) const
Definition AssetDataGatherer.cpp:2860
bool IsOnDenyList(FStringView LocalAbsPath) const
Definition AssetDataGatherer.cpp:2846
void GetAndTrimSearchResults(bool &bOutIsComplete, TArray< FString > &OutDiscoveredPaths, FFilesToSearch &OutFilesToSearch, int32 &OutNumPathsToSearch)
Definition AssetDataGatherer.cpp:2302
void TrySetDirectoryProperties(const FString &LocalAbsPath, const FSetPathProperties &Properties, bool bConfirmedExists)
Definition AssetDataGatherer.cpp:2796
bool IsCacheWriteEnabled() const
Definition AssetDataGatherer.cpp:2868
SIZE_T GetAllocatedSize() const
Definition AssetDataGatherer.cpp:2885
void PrioritizeSearchPath(const FString &LocalAbsPath, EPriority Priority)
Definition AssetDataGatherer.cpp:2761
void OnFilesCreated(TConstArrayView< FString > LocalAbsPaths)
Definition AssetDataGatherer.cpp:3099
void RemoveMountPoint(const FString &LocalAbsPath)
Definition AssetDataGatherer.cpp:3028
virtual uint32 Run() override
Definition AssetDataGatherer.cpp:1656
bool IsIdle() const
Definition AssetDataGatherer.cpp:2385
void OnAdditionalMountSearchCompleted()
Definition AssetDataGatherer.cpp:1752
void GetDiagnostics(float &OutCumulativeDiscoveryTime, int32 &OutNumCachedDirectories, int32 &OutNumUncachedDirectories)
Definition AssetDataGatherer.cpp:2331
void OnDirectoryCreated(FStringView LocalAbsPath)
Definition AssetDataGatherer.cpp:3066
void OnInitialSearchCompleted()
Definition AssetDataGatherer.cpp:1746
virtual void Stop() override
Definition AssetDataGatherer.cpp:1725
void StartAsync()
Definition AssetDataGatherer.cpp:1637
void AddMountPoint(const FString &LocalAbsPath, FStringView LongPackageName, bool &bOutAlreadyExisted)
Definition AssetDataGatherer.cpp:2964
void SetPropertiesAndWait(TArrayView< FPathExistence > QueryPaths, bool bAddToAllowList, bool bForceRescan, bool bIgnoreDenyListScanFilters)
Definition AssetDataGatherer.cpp:2499
virtual ~FAssetDataDiscovery()
Definition AssetDataGatherer.cpp:1625
void EnsureCompletion()
Definition AssetDataGatherer.cpp:1734
virtual bool Init() override
Definition AssetDataGatherer.cpp:1651
FAssetDataDiscovery()
Definition AssetDataGatherer.cpp:1604
bool IsSynchronous() const
Definition AssetDataGatherer.cpp:1646
virtual void Exit() override
Definition AssetDataGatherer.cpp:1730
void WaitForIdle(double EndTimeSeconds)
Definition AssetDataGatherer.cpp:2341
Definition AssetDataGathererPrivate.h:199
void ProcessReadContexts(TArray< TUniquePtr< UE::AssetDataGather::Private::FReadContext > > &&ReadContexts, bool bIsTimeSliced)
Definition AssetDataGatherer.cpp:5873
void FreeReadTaskLoaders()
Definition AssetDataGatherer.cpp:5863
void WaitOnDirectoriesAndUpdateWaitList(FWaitBatchDirectorySet &WaitBatchDirectories)
Definition AssetDataGatherer.cpp:6050
~FFileReadScheduler()
Definition AssetDataGatherer.cpp:5854
bool IsAssetPackageDataGatherEnabled() const
Definition AssetDataGathererPrivate.h:1106
bool IsDependsDataGatherEnabled() const
Definition AssetDataGathererPrivate.h:1110
void CollectCompletedReads(TArray< TUniquePtr< FReadContext > > &OutReadyContexts)
Definition AssetDataGatherer.cpp:6147
void Shrink()
Definition AssetDataGatherer.cpp:6161
void Schedule(const TArray< FString > &PriorityDirectories)
Definition AssetDataGatherer.cpp:6119
void RemoveScheduledDirectory(const FString &Directory)
Definition AssetDataGatherer.cpp:6156
void AddFile(const FName PackageName, FGatheredPathData &&AssetData)
Definition AssetDataGatherer.cpp:5982
Definition AssetDataGathererPrivate.h:279
void PopFront(TArray< FGatheredPathData, AllocatorType > &Out, int32 NumToPop)
Definition AssetDataGatherer.cpp:6205
void PrioritizePath(FPathExistence &QueryPath, EPriority Priority)
Definition AssetDataGatherer.cpp:6222
void PopPriorityDirectories(TArray< FString > &OutPriorityDirectories)
Definition AssetDataGatherer.cpp:6247
int32 NumBlockingFiles() const
Definition AssetDataGatherer.cpp:6255
int32 GetNumAvailable() const
Definition AssetDataGatherer.cpp:6292
void AddFiles(TArray< FGatheredPathData > &&FilePaths)
Definition AssetDataGatherer.cpp:6172
int32 Num() const
Definition AssetDataGatherer.cpp:6287
SIZE_T GetAllocatedSize() const
Definition AssetDataGatherer.cpp:6297
void AddFileAgainAfterTimeout(FGatheredPathData &&FilePath)
Definition AssetDataGatherer.cpp:6183
void AddFileForLaterRetry(FGatheredPathData &&FilePath)
Definition AssetDataGatherer.cpp:6189
void RetryLaterRetryFiles()
Definition AssetDataGatherer.cpp:6194
void Shrink()
Definition AssetDataGatherer.cpp:6260
void AddPriorityFile(FGatheredPathData &&FilePath)
Definition AssetDataGatherer.cpp:6166
Definition AssetDataGathererPrivate.h:559
void SetParentMount(FMountDir *ParentMount)
Definition AssetDataGatherer.cpp:1533
void Shrink()
Definition AssetDataGatherer.cpp:1299
void RemoveChildMount(FMountDir *ChildMount)
Definition AssetDataGatherer.cpp:1503
FStringView GetLongPackageName() const
Definition AssetDataGatherer.cpp:1259
void AddChildMount(FMountDir *ChildMount)
Definition AssetDataGatherer.cpp:1481
FString LongPackageName
Definition AssetDataGathererPrivate.h:648
TSet< FString > RelPathsDenyList
Definition AssetDataGathererPrivate.h:644
void TrySetDirectoryProperties(FPathExistence &QueryPath, const FSetPathProperties &InProperties, FScanDirAndParentData *OutControllingDir=nullptr, FStringView *OutControllingDirRelPath=nullptr, bool *bOutMadeChanges=nullptr)
Definition AssetDataGatherer.cpp:1330
bool IsChildMountPath(FStringView MountRelPath) const
Definition AssetDataGatherer.cpp:1591
TRefCountPtr< FScanDir > Root
Definition AssetDataGathererPrivate.h:653
void GetMonitorData(FStringView InLocalAbsPath, FScanDir::FInherited &OutData) const
Definition AssetDataGatherer.cpp:1311
void MarkDirty(FStringView MountRelPath)
Definition AssetDataGatherer.cpp:1561
FAssetDataDiscovery & GetDiscovery() const
Definition AssetDataGatherer.cpp:1264
FMountDir * ParentMount
Definition AssetDataGathererPrivate.h:660
TArray< FMountDir * > GetChildMounts() const
Definition AssetDataGatherer.cpp:1543
void UpdateDenyList()
Definition AssetDataGatherer.cpp:1386
FStringView GetLocalAbsPath() const
Definition AssetDataGatherer.cpp:1254
FAssetDataDiscovery & Discovery
Definition AssetDataGathererPrivate.h:655
void AddChildMountPath(FStringView MountRelPath)
Definition AssetDataGatherer.cpp:1577
~FMountDir()
Definition AssetDataGatherer.cpp:1247
FMountDir * GetParentMount() const
Definition AssetDataGatherer.cpp:1538
TArray< FString > ChildMountPaths
Definition AssetDataGathererPrivate.h:639
void SetHasStartedScanning()
Definition AssetDataGatherer.cpp:1476
bool RemoveChildMountPath(FStringView MountRelPath)
Definition AssetDataGatherer.cpp:1586
void OnDestroyClearChildMounts()
Definition AssetDataGatherer.cpp:1528
FScanDir * GetControllingDir(FStringView LocalAbsPath, bool bIsDirectory, FScanDir::FInherited &OutParentData, FString &OutRelPath)
Definition AssetDataGatherer.cpp:1269
bool IsComplete() const
Definition AssetDataGatherer.cpp:1306
FScanDir * GetFirstIncompleteScanDir()
Definition AssetDataGatherer.cpp:1471
SIZE_T GetAllocatedSize() const
Definition AssetDataGatherer.cpp:1281
bool IsMonitored(FStringView InLocalAbsPath) const
Definition AssetDataGatherer.cpp:1323
bool bHasStartedScanning
Definition AssetDataGathererPrivate.h:662
FString LocalAbsPath
Definition AssetDataGathererPrivate.h:646
Definition AssetDataGathererPrivate.h:369
void ForEachDescendent(const CallbackType &Callback)
Definition AssetDataGatherer.cpp:1218
~FScanDir()
Definition AssetDataGatherer.cpp:475
void RemoveSubDir(FStringView SubDirBaseName)
Definition AssetDataGatherer.cpp:1186
void AppendLocalAbsPath(FStringBuilderBase &OutFullPath) const
Definition AssetDataGatherer.cpp:524
void SetComplete(bool bInIsComplete)
Definition AssetDataGatherer.cpp:1113
FString RelPath
Definition AssetDataGathererPrivate.h:530
void MarkDirty(bool bMarkDescendents)
Definition AssetDataGatherer.cpp:1091
bool bIsComplete
Definition AssetDataGathererPrivate.h:536
TArray< TRefCountPtr< FScanDir > > SubDirs
Definition AssetDataGathererPrivate.h:526
bool IsMonitored(const FInherited &ParentData) const
Definition AssetDataGatherer.cpp:632
FInherited DirectData
Definition AssetDataGathererPrivate.h:532
void SetScanInFlightInvalidated(bool bInValidated)
Definition AssetDataGatherer.cpp:1086
FScanDir * GetControllingDir(FStringView InRelPath, bool bIsDirectory, const FInherited &ParentData, FInherited &OutData, FString &OutRelPath)
Definition AssetDataGatherer.cpp:675
TArray< FString > AlreadyScannedFiles
Definition AssetDataGathererPrivate.h:527
FString GetLocalAbsPath() const
Definition AssetDataGatherer.cpp:544
void SetScanInFlight(bool bInScanInFlight)
Definition AssetDataGatherer.cpp:1076
void MarkFileAlreadyScanned(FStringView BaseName)
Definition AssetDataGatherer.cpp:937
bool bScanInFlightInvalidated
Definition AssetDataGathererPrivate.h:535
FMountDir * GetMountDir() const
Definition AssetDataGatherer.cpp:514
SIZE_T GetAllocatedSize() const
Definition AssetDataGatherer.cpp:657
FString GetMountRelPath() const
Definition AssetDataGatherer.cpp:570
void TrySetDirectoryProperties(FPathExistence &QueryPath, FStringView InRelPath, FInherited &ParentData, const FSetPathProperties &InProperties, FScanDirAndParentData &OutControllingDir, FStringView &OutControllingDirRelPath, bool &bInOutMadeChanges)
Definition AssetDataGatherer.cpp:728
FScanDir * Parent
Definition AssetDataGathererPrivate.h:529
bool IsScanInFlightInvalidated() const
Definition AssetDataGatherer.cpp:1081
FScanDir * FindSubDir(FStringView SubDirBaseName)
Definition AssetDataGatherer.cpp:1152
void Shrink()
Definition AssetDataGatherer.cpp:1105
bool HasScanned() const
Definition AssetDataGatherer.cpp:647
void AppendMountRelPath(FStringBuilderBase &OutRelPath) const
Definition AssetDataGatherer.cpp:551
bool HasPersistentSettings() const
Definition AssetDataGatherer.cpp:1147
FStringView GetRelPath() const
Definition AssetDataGatherer.cpp:519
FScanDir & FindOrAddSubDir(FStringView SubDirBaseName)
Definition AssetDataGatherer.cpp:1170
void GetMonitorData(FStringView InRelPath, const FInherited &ParentData, FInherited &OutData) const
Definition AssetDataGatherer.cpp:604
bool ShouldScan(const FInherited &ParentData) const
Definition AssetDataGatherer.cpp:642
void SetScanResults(FStringView LocalAbsPath, const FInherited &ParentData, TArrayView< FDiscoveredPathData > &InOutSubDirs, TArrayView< FDiscoveredPathData > &InOutFiles)
Definition AssetDataGatherer.cpp:954
int32 FindLowerBoundSubDir(FStringView SubDirBaseName)
Definition AssetDataGatherer.cpp:1197
FMountDir * MountDir
Definition AssetDataGathererPrivate.h:528
bool bHasScanned
Definition AssetDataGathererPrivate.h:533
bool IsValid() const
Definition AssetDataGatherer.cpp:509
bool bScanInFlight
Definition AssetDataGathererPrivate.h:534
bool IsComplete() const
Definition AssetDataGatherer.cpp:652
FScanDir * GetFirstIncompleteScanDir()
Definition AssetDataGatherer.cpp:1054
void Shutdown()
Definition AssetDataGatherer.cpp:481
bool IsScanInFlight() const
Definition AssetDataGatherer.cpp:1071
void ForEachSubDir(const CallbackType &Callback)
Definition AssetDataGatherer.cpp:1208
Definition TaskConcurrencyLimiter.h:117
Definition Task.h:236
bool IsCompleted() const
Definition Task.h:68
Definition AssetDataGatherer.cpp:50
TSet< FWaitBatchDirectory, FWaitBatchDirectorySetFuncs > FWaitBatchDirectorySet
Definition AssetDataGatherer.h:83
EFeatureEnabled
Definition AssetDataGathererDiscoveryCache.h:20
EPriority
Definition AssetDataGathererPrivate.h:25
EGatherableFileType
Definition AssetDataGathererPrivate.h:66
EEditorGameScanMode
Definition AssetDataGathererPrivate.h:940
FGatherSettings GGatherSettings
Definition AssetDataGatherer.cpp:338
EOptionalBool
Definition DiskCachedAssetData.h:12
@ LatestVersion
Definition AssetData.h:111
Definition DateTime.h:76
Definition Timespan.h:76
Definition Optional.h:131
constexpr bool IsSet() const
Definition Optional.h:69
Definition AssetDataGathererPrivate.h:138
FDirectoryReadTaskData()
Definition AssetDataGathererPrivate.h:139
bool bHasCanceledRead
Definition AssetDataGathererPrivate.h:158
UE::Tasks::FTask LastScheduledReadTask
Definition AssetDataGathererPrivate.h:155
UE::Tasks::FTaskEvent UnblockRead
Definition AssetDataGathererPrivate.h:154
~FDirectoryReadTaskData()
Definition AssetDataGathererPrivate.h:145
int32 OutstandingReads
Definition AssetDataGathererPrivate.h:156
Definition AssetDataGathererPrivate.h:78
void Assign(FStringView InLocalAbsPath, FStringView InLongPackageName, FStringView InRelPath, const FDateTime &InPackageTimestamp, bool InIsReadOnly, EGatherableFileType InType)
Definition AssetDataGatherer.cpp:407
FDateTime PackageTimestamp
Definition AssetDataGathererPrivate.h:86
EGatherableFileType Type
Definition AssetDataGathererPrivate.h:90
SIZE_T GetAllocatedSize() const
Definition AssetDataGatherer.cpp:415
FString LocalAbsPath
Definition AssetDataGathererPrivate.h:80
bool bIsReadOnly
Definition AssetDataGathererPrivate.h:88
FString RelPath
Definition AssetDataGathererPrivate.h:84
FString LongPackageName
Definition AssetDataGathererPrivate.h:82
Definition AssetDataGathererPrivate.h:951
bool IsGatherCacheWriteEnabled() const
Definition AssetDataGathererPrivate.h:1042
static constexpr uint64 CurrentVersion
Definition AssetDataGathererPrivate.h:958
bool IsPreloadDiscoveryCache() const
Definition AssetDataGathererPrivate.h:1067
FString GetLegacyCacheFilename() const
Definition AssetDataGathererPrivate.h:1087
bool IsAsyncEnabled() const
Definition AssetDataGathererPrivate.h:1032
static int32 GARGatherCacheParallelism
Definition AssetDataGathererPrivate.h:988
static constexpr int32 MinAssetReadsBeforeCacheWrite
Definition AssetDataGathererPrivate.h:955
TArray< FString > FindShardedCacheFiles() const
Definition AssetDataGatherer.cpp:323
EFeatureEnabled IsDiscoveryCacheWriteEnabled() const
Definition AssetDataGathererPrivate.h:1052
static constexpr int32 ExpectedMaxBatchSize
Definition AssetDataGathererPrivate.h:953
bool IsDiscoveryCacheReadEnabled() const
Definition AssetDataGathererPrivate.h:1047
static int32 GARGatherThreads
Definition AssetDataGathererPrivate.h:981
bool IsDiscoveryCacheInvalidateEnabled() const
Definition AssetDataGathererPrivate.h:1057
static int32 GARDiscoverThreads
Definition AssetDataGathererPrivate.h:969
bool IsForceDependsGathering() const
Definition AssetDataGathererPrivate.h:1077
static constexpr uint32 CacheSerializationMagic
Definition AssetDataGathererPrivate.h:957
FString GetLegacyNonMonolithicCacheDirectory() const
Definition AssetDataGathererPrivate.h:1092
static int32 GARDiscoverMinBatchSize
Definition AssetDataGathererPrivate.h:974
static constexpr int32 MinSecondsToElapseBeforeCacheWrite
Definition AssetDataGathererPrivate.h:954
const FString & GetAssetRegistryCacheRootFolder() const
Definition AssetDataGathererPrivate.h:1102
bool IsGatherCacheReadEnabled() const
Definition AssetDataGathererPrivate.h:1037
const FString & GetCacheBaseFilename() const
Definition AssetDataGathererPrivate.h:1097
static constexpr int32 CacheShardAssetCount
Definition AssetDataGathererPrivate.h:956
void Initialize()
Definition AssetDataGatherer.cpp:175
bool IsPreloadGatherCache() const
Definition AssetDataGathererPrivate.h:1062
EEditorGameScanMode GetEditorGameScanMode() const
Definition AssetDataGathererPrivate.h:1082
static const FTimespan CachePruneAge
Definition AssetDataGathererPrivate.h:959
bool IsGatherDependsData() const
Definition AssetDataGathererPrivate.h:1072
static constexpr float PollDiscoveryPeriodSeconds
Definition AssetDataGathererPrivate.h:962
Definition AssetDataGathererPrivate.h:108
void Assign(FStringView InLocalAbsPath, FStringView InLongPackageName, const FDateTime &InPackageTimestamp, bool InIsReadOnly, EGatherableFileType InType)
Definition AssetDataGatherer.cpp:445
FString LongPackageName
Definition AssetDataGathererPrivate.h:112
FDateTime PackageTimestamp
Definition AssetDataGathererPrivate.h:114
FString LocalAbsPath
Definition AssetDataGathererPrivate.h:110
EGatherableFileType Type
Definition AssetDataGathererPrivate.h:118
SIZE_T GetAllocatedSize() const
Definition AssetDataGatherer.cpp:461
bool bIsReadOnly
Definition AssetDataGathererPrivate.h:116
Definition AssetDataGathererPrivate.h:329
FStringView GetLowestExistingPath()
Definition AssetDataGatherer.cpp:2400
void SetConfirmedExists(bool bValue)
Definition AssetDataGatherer.cpp:2494
const FString & GetLocalAbsPath() const
Definition AssetDataGatherer.cpp:2395
FDateTime GetModificationTime()
Definition AssetDataGatherer.cpp:2420
EType
Definition AssetDataGathererPrivate.h:332
@ MissingButDirExists
Definition AssetDataGathererPrivate.h:335
@ MissingParentDir
Definition AssetDataGathererPrivate.h:336
@ Directory
Definition AssetDataGathererPrivate.h:333
@ File
Definition AssetDataGathererPrivate.h:334
bool IsReadOnly()
Definition AssetDataGatherer.cpp:2426
bool HasExistenceData() const
Definition AssetDataGatherer.cpp:2489
EType GetType()
Definition AssetDataGatherer.cpp:2414
void LoadExistenceData()
Definition AssetDataGatherer.cpp:2432
Definition AssetDataGathererPrivate.h:163
bool bResult
Definition AssetDataGathererPrivate.h:173
FPackageDependencyData DependencyData
Definition AssetDataGathererPrivate.h:168
bool bCanceled
Definition AssetDataGathererPrivate.h:174
~FReadContext()
Definition AssetDataGathererPrivate.h:189
FReadContext(FName InPackageName, FName InExtension, FGatheredPathData &&InAssetFileData, TSharedPtr< FDirectoryReadTaskData > InDirectoryReadTaskData)
Definition AssetDataGathererPrivate.h:176
UE::AssetRegistry::Private::EOptionalBool HasMarkOfTheWeb
Definition AssetDataGathererPrivate.h:171
bool bCanAttemptAssetRetry
Definition AssetDataGathererPrivate.h:172
TSharedPtr< FDirectoryReadTaskData > DirectoryReadTaskData
Definition AssetDataGathererPrivate.h:170
FGatheredPathData AssetFileData
Definition AssetDataGathererPrivate.h:166
TArray< FString > CookedPackageNamesWithoutAssetData
Definition AssetDataGathererPrivate.h:169
FName Extension
Definition AssetDataGathererPrivate.h:165
FName PackageName
Definition AssetDataGathererPrivate.h:164
TArray< FAssetData * > AssetDataFromFile
Definition AssetDataGathererPrivate.h:167
Definition AssetDataGathererPrivate.h:544
FScanDir::FInherited ParentData
Definition AssetDataGathererPrivate.h:546
TRefCountPtr< FScanDir > ScanDir
Definition AssetDataGathererPrivate.h:545
Definition AssetDataGathererPrivate.h:373
bool IsMonitored() const
Definition AssetDataGatherer.cpp:577
bool bMatchesDenyList
Definition AssetDataGathererPrivate.h:379
bool IsOnAllowList() const
Definition AssetDataGatherer.cpp:587
bool IsOnDenyList() const
Definition AssetDataGatherer.cpp:582
bool bIgnoreDenyList
Definition AssetDataGathererPrivate.h:381
bool HasSetting() const
Definition AssetDataGatherer.cpp:592
bool bIsOnAllowList
Definition AssetDataGathererPrivate.h:377
Definition AssetDataGathererPrivate.h:39
bool IsSet() const
Definition AssetDataGathererPrivate.h:57
TOptional< bool > HasScanned
Definition AssetDataGathererPrivate.h:54
TOptional< bool > IgnoreDenyList
Definition AssetDataGathererPrivate.h:49
TOptional< bool > IsOnAllowList
Definition AssetDataGathererPrivate.h:41
TOptional< bool > MatchesDenyList
Definition AssetDataGathererPrivate.h:45