UKismetSystemLibrary::MakeARFilter
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Builds an FARFilter struct from individual filter criteria, for use with the Asset Registry search functions. Used to construct complex asset queries (by package, path, class, and recursion rules) from Blueprint.
Caveats & Gotchas
- • ClassNames and RecursiveClassesExclusionSet are deprecated short-name equivalents of ClassPaths and RecursiveClassPathsExclusionSet; passing non-empty values into them produces a runtime warning and you should migrate to the path-based inputs.
- • All array/set inputs use AutoCreateRefTerm, so leaving them unconnected in Blueprint passes empty containers rather than causing a compile error — an empty filter with no criteria will match every asset.
- • bIncludeOnlyOnDiskAssets excludes assets that only exist in memory (e.g. newly created but unsaved), which can surprise editor tooling that queries immediately after asset creation.
Signature
static FARFilter MakeARFilter(const TArray<FName>& PackageNames, const TArray<FName>& PackagePaths, const TArray<FSoftObjectPath>& SoftObjectPaths, const TArray<FTopLevelAssetPath>& ClassPaths, const TSet<FTopLevelAssetPath>& RecursiveClassPathsExclusionSet, const TArray<FName>& ClassNames, const TSet<FName>& RecursiveClassesExclusionSet, const bool bRecursivePaths = false, const bool bRecursiveClasses = false, const bool bIncludeOnlyOnDiskAssets = false) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| PackageNames | const TArray<FName>& | Package names to filter by, matched exactly against the asset's package. | — |
| PackagePaths | const TArray<FName>& | Package paths (folders) to filter by. | — |
| SoftObjectPaths | const TArray<FSoftObjectPath>& | Exact soft object paths to include in the filter. | — |
| ClassPaths | const TArray<FTopLevelAssetPath>& | Class paths to filter results by; the preferred way to filter by class. | — |
| RecursiveClassPathsExclusionSet | const TSet<FTopLevelAssetPath>& | Class paths to exclude when recursively expanding ClassPaths. | — |
| ClassNames | const TArray<FName>& | Deprecated short class names; produces a runtime warning if non-empty. Use ClassPaths instead. | — |
| RecursiveClassesExclusionSet | const TSet<FName>& | Deprecated short class name exclusion set. Use RecursiveClassPathsExclusionSet instead. | — |
| bRecursivePaths | const bool | If true, PackagePaths are searched recursively into subfolders. | false |
| bRecursiveClasses | const bool | If true, ClassPaths are expanded to include derived classes. | false |
| bIncludeOnlyOnDiskAssets | const bool | If true, only assets already saved to disk are considered; unsaved/in-memory assets are excluded. | false |
Return Type
FARFilter Example
Construct a filter and build the ARFilter C++
TArray<FTopLevelAssetPath> ClassPaths;
ClassPaths.Add(FTopLevelAssetPath(TEXT("/Script/Engine"), TEXT("StaticMesh")));
FARFilter Filter = UKismetSystemLibrary::MakeARFilter(
TArray<FName>(),
TArray<FName>{ TEXT("/Game/Meshes") },
TArray<FSoftObjectPath>(),
ClassPaths,
TSet<FTopLevelAssetPath>(),
TArray<FName>(),
TSet<FName>(),
/*bRecursivePaths=*/true,
/*bRecursiveClasses=*/false,
/*bIncludeOnlyOnDiskAssets=*/false); See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?