UAssetManager::ScanPathsSynchronous
#include "Engine/AssetManager.h"
Access: public
Specifiers: virtualconst
Description
Requests that the asset registry synchronously scan a list of directories or specific assets, blocking until the scan completes.
Caveats & Gotchas
- • Blocks the calling thread until the scan finishes — calling this on large directories at runtime can cause a noticeable hitch, so prefer scanning known folders during initialization rather than mid-gameplay.
- • In cooked builds the asset registry may already be fully populated from a pre-built cache, making this a no-op for paths already covered by that cache.
Signature
virtual void ScanPathsSynchronous(const TArray<FString>& PathsToScan) const Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| PathsToScan | const TArray<FString>& | Directories or individual asset paths to force a synchronous asset registry scan on. | — |
Return Type
void Example
Force a directory scan before searching it C++
TArray<FString> Paths;
Paths.Add(TEXT("/Game/DLC/Items"));
UAssetManager::Get().ScanPathsSynchronous(Paths); Tags
Version History
Introduced in: 4.22
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?