find_unused_assets
Find assets in an Unreal folder with zero referencers, annotate protected, config-named, and base-library forks with keep reasons, and list only deletion candidates.
Instructions
Find assets in a folder with zero referencers, and annotate each survivor with the reasons it should be KEPT anyway. "Zero referencers" is not the same as "safe to delete": there are three common ways an asset stays alive with an empty referencer set -- it is explicitly protected, a Config/Default*.ini names it, or it is a fork descending from a vendored base library. Each becomes a keep_reason string on the entry; deletion_candidates lists only the entries with NO keep_reason. Nothing is ever removed from unused_assets by these flags (hiding a genuinely unreferenced asset would be the same lie in the other direction). NOTE: there is deliberately no is_world -- it is already visible in class_name ("World").
Returns: { folder_path, folder_exists, recursive, dependency_type, protect_paths: [string], include_lineage_reasons, base_libraries: [string], unused_assets: [{path, class_name, size_kb, keep_reasons: [string], keep_reason_detail: {...}}], unused_count, total_scanned, deletion_candidates: [string], deletion_candidate_count, assets_with_keep_reason, keep_reason_counts: {protected_path, referenced_by_config, descends_from_base_library}, config_scan: {files_scanned: int, files: [string]}, lineage_scan: {attempted, blueprints_loaded, skipped_non_blueprint, load_failures} }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| recursive | No | If true, scan subfolders, default true | |
| folder_path | Yes | Content folder to scan, e.g. /Game/Unused | |
| protect_paths | No | Wildcard patterns (FString::MatchesWildcard, case-insensitive, `*` spans '/') matched against the package name and the object path. Default [] . A match adds keep_reason "protected_path". | |
| base_libraries | No | Vendored-library content roots for the lineage check. Default: the project's Read Only Content Roots (same default as audit_class_purity). | |
| dependency_type | No | Referencer filter: "hard"|"soft"|"all" (case-insensitive), default "all" (identical behavior to omitting it) | |
| exclude_classes | No | Optional list of class name fragments to skip | |
| include_lineage_reasons | No | Default FALSE because it LOADS every candidate Blueprint. When true, a Blueprint whose super chain reaches a class owned by one of base_libraries gets keep_reason "descends_from_base_library" -- the only signal that saves a fork carrying no fork-origin tag (project setting Fork Origin Tag). |