RealDocs

UAssetManager::PushBulkScanning

function Engine Since unknown
#include "Engine/AssetManager.h"
Access: public

Description

Marks the start of a batch of ScanPathsForPrimaryAssets calls so the AssetManager can defer expensive per-scan bookkeeping until the matching PopBulkScanning. Every call must be paired with a PopBulkScanning.

Caveats & Gotchas

  • Every PushBulkScanning() call must be matched by exactly one PopBulkScanning(); mismatched calls leave the manager in bulk-scan mode indefinitely, silently deferring bookkeeping that gameplay code may expect to be up to date.
  • Nested calls are allowed (an internal request count is tracked), but only the outermost PopBulkScanning() actually triggers the deferred work.

Signature

void PushBulkScanning();

Return Type

void

Example

Batching several scans C++
UAssetManager::Get().PushBulkScanning();
UAssetManager::Get().ScanPathsForPrimaryAssets(FPrimaryAssetType("Item"), { TEXT("/Game/Items") }, UItemDefinition::StaticClass(), false);
UAssetManager::Get().ScanPathsForPrimaryAssets(FPrimaryAssetType("Ability"), { TEXT("/Game/Abilities") }, UAbilityDefinition::StaticClass(), false);
UAssetManager::Get().PopBulkScanning();

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.