UAssetManager::RemoveScanPathsForPrimaryAssets
#include "Engine/AssetManager.h"
Access: public
Specifiers: virtual
Description
Removes primary assets found under the given paths from the asset directory, undoing a prior ScanPathsForPrimaryAssets call. Does not delete the underlying asset files.
Caveats & Gotchas
- • Removes directory entries only — it does not delete or unload the underlying asset files or objects.
- • Paths, BaseClass, and bHasBlueprintClasses must match what was originally passed to ScanPathsForPrimaryAssets or the matching assets won't be found for removal.
Signature
virtual void RemoveScanPathsForPrimaryAssets(FPrimaryAssetType PrimaryAssetType, const TArray<FString>& Paths, UClass* BaseClass, bool bHasBlueprintClasses, bool bIsEditorOnly = false); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| PrimaryAssetType | FPrimaryAssetType | Type the assets were originally scanned under. | — |
| Paths | const TArray<FString>& | File system paths whose scanned assets should be removed. | — |
| BaseClass | UClass* | Base class used in the original scan; must match to find the entries. | — |
| bHasBlueprintClasses | bool | Must match the value passed to the original scan call. | — |
| bIsEditorOnly | bool | Must match the value passed to the original scan call. | false |
Return Type
void Example
Undoing a previous scan C++
TArray<FString> Paths = { TEXT("/Game/Items") };
UAssetManager::Get().RemoveScanPathsForPrimaryAssets(
FPrimaryAssetType("Item"),
Paths,
UItemDefinition::StaticClass(),
/*bHasBlueprintClasses=*/ false); Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?