Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UAssetManager
Description
Scans a list of paths and reads asset data for all primary assets of a specific type. If done in the editor it will load the data off disk, in cooked games it will load out of the asset registry cache
| Name | ScanPathsForPrimaryAssets |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/AssetManager.h |
| Include Path | #include "Engine/AssetManager.h" |
| Source | /Engine/Source/Runtime/Engine/Private/AssetManager.cpp |
virtual int32 ScanPathsForPrimaryAssets
(
FPrimaryAssetType PrimaryAssetType,
const TArray < FString > & Paths,
UClass * BaseClass,
bool bHasBlueprintClasses,
bool bIsEditorOnly,
bool bForceSynchronousScan
)
Number of primary assets found
Parameters
| Name | Remarks |
|---|---|
| PrimaryAssetType | Type of asset to look for. If the scanned asset matches GetPrimaryAssetType with this it will be added to directory |
| Paths | List of file system paths to scan |
| BaseClass | Base class of all loaded assets, if the scanned asset isn't a child of this class it will be skipped |
| bHasBlueprintClasses | If true, the assets are blueprints that subclass BaseClass. If false they are base UObject assets |
| bIsEditorOnly | If true, assets will only be scanned in editor builds, and will not be stored into the asset registry |
| bForceSynchronousScan | If true will scan the disk synchronously, otherwise will wait for asset registry scan to complete |