UAssetManager::DoesAssetMatchSearchRules
#include "Engine/AssetManager.h"
Access: public
Specifiers: virtualconst
Description
Checks whether a single asset passes the restrictions defined in Rules. Useful when an asset has been manually registered and needs the same filtering logic used by SearchAssetRegistryPaths applied without re-running a full search.
Caveats & Gotchas
- • Only checks the pattern/base-class restrictions in Rules — it does not check whether AssetData's path actually falls under Rules.AssetScanPaths, since that's a separate directory-scope concern handled by the caller.
- • Uses the same wildcard matching as SearchAssetRegistryPaths, so keep the two consistent if you're pre-filtering results manually.
Signature
virtual bool DoesAssetMatchSearchRules(const FAssetData& AssetData, const FAssetManagerSearchRules& Rules) const Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| AssetData | const FAssetData& | Single asset to test. | — |
| Rules | const FAssetManagerSearchRules& | Search rules to test the asset against. | — |
Return Type
bool Example
Validate a manually registered asset against existing rules C++
if (UAssetManager::Get().DoesAssetMatchSearchRules(NewAssetData, ExistingRules))
{
// Asset qualifies under the same rules used for the initial scan
} Tags
Version History
Introduced in: 4.22
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?