search_assets_by_pattern
Search every mounted content root for assets whose name matches a substring or wildcard pattern, returning each hit's path, class, and package.
Instructions
Find assets by NAME, scanning every mounted content root (/Game, /Engine, /Water, plugin mounts, ...) and returning name, object path, class and package per hit. The broad "does anything called exist, and where?" search. It has TWO match modes and picks one automatically, reporting which in match_mode: a pattern WITHOUT */? is a case-insensitive SUBSTRING test (FString::Contains) -- pass the bare token, this is the common case; a pattern WITH * or ? is a real glob (FString::MatchesWildcard). WARNING: The glob is ANCHORED AT BOTH ENDS -- it matches the WHOLE name, not a substring -- so Grass* means "starts with Grass" and *Grass* is what reproduces substring behaviour. It only ever looks at the asset NAME, so it cannot find an asset by its folder or by a class it belongs to: use resolve_asset_by_name to check ONE exact name and get every homonym, get_assets_in_folder to enumerate a directory, get_assets_by_type for the 5 built-in type filters, and get_assets_by_tag for an Asset Registry tag.
Returns: { assets: [{ name, path, class, package, is_loaded }], count: int, total_scanned: int, scan_was_pending: bool, search_pattern: string, match_mode: "substring"|"wildcard", case_sensitive: bool, max_results: int, results_truncated: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | No | Alias of `search_pattern` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `search_pattern`. | |
| max_results | No | Cap on number of matched assets (1..50000); defaults to 1000. WARNING: Hitting the cap ABORTS the enumeration, so `total_scanned` then counts only the assets visited before the early-out, not the whole registry. | |
| wait_for_scan | No | When true (default), force-completes the AssetRegistry scan before enumerating so a still-loading registry cannot report total_scanned:0. Set false to skip the (possibly blocking) wait. | |
| case_sensitive | No | When true, match is case-sensitive; defaults to false | |
| search_pattern | No | Matched against the asset NAME. Contains no `*`/`?` -> case-insensitive substring (FString::Contains). Contains `*` or `?` -> glob (FString::MatchesWildcard), ANCHORED at both ends: `*` matches any run including empty, `?` matches 0 or 1 character (UE semantics, not exactly 1). Not a regex. |