UAssetManager::HasInitialScanCompleted
#include "Engine/AssetManager.h"
Access: public
Specifiers: virtualconst
Description
Returns true once the AssetManager has finished its startup scan of all configured primary asset types. In editor builds this can complete much later than in cooked games.
Caveats & Gotchas
- • In editor builds the initial scan can complete much later than in cooked games because it depends on the asset registry's background scan finishing first.
- • Code that runs before this returns true may see incomplete GetPrimaryAssetIdList/GetPrimaryAssetDataList results for types that haven't finished scanning yet.
Signature
virtual bool HasInitialScanCompleted() const; Return Type
bool Example
Waiting for the initial scan before querying assets C++
if (UAssetManager::Get().HasInitialScanCompleted())
{
TArray<FPrimaryAssetId> AllItems;
UAssetManager::Get().GetPrimaryAssetIdList(FPrimaryAssetType("Item"), AllItems);
} See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?