audit_fork_refs
Detect fork assets whose internal references still target the original source tree, then optionally remap each source object to its same-named fork counterpart.
Instructions
Audit a fork subtree for references that still point at the SOURCE tree it was copied from (duplicate_asset / duplicate_directory by script do NOT remap internal refs, so a copy keeps pointing at the original -- e.g. a MaterialInstance Parent still under /Game/VendorPack). Reports, per fork asset, the source dependencies (authoritative, from the AssetRegistry) and, best-effort, the exact PROPERTY holding each source object ref. With fix=true it FArchiveReplaceObjectRefs each source object to a same-named counterpart found inside the fork and saves the asset.
Returns: { fork_root: string, source_root: string, fix: bool, dependency_type: string, assets_scanned: int, offending_count: int, total_source_dependencies: int, offenders: [{asset, package, source_dependencies:[string], properties:[{property, ref}], remapped:int}], fixed_assets: int, refs_remapped: int, unresolved_counterparts: [string], message: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fix | No | Optional bool (default false). Remap source object refs to a same-named fork counterpart via FArchiveReplaceObjectRef and save the asset. | |
| fork_root | Yes | Fork content path to audit, e.g. '/Game/MyGame/Environment/AutoLandscape'. | |
| max_assets | No | Max fork assets to scan (optional, default 2000; clamped 1..20000). | |
| source_root | No | Origin tree the refs should not point at (optional; defaults to the project's Read Only Content Root when exactly one is configured). | |
| dependency_type | No | Optional string, one of "hard"|"soft"|"all" (case-insensitive, default "all"). Scopes the per-asset dependency scan: "hard" surfaces only load-bearing refs into source_root (e.g. a MaterialInstance Parent, a hard object property) -- the correctness-critical case this audit exists for; "soft" surfaces only soft/lazy refs (TSoftObjectPtr, FSoftObjectPath); "all" (default) leaves the scan unscoped. | |
| include_properties | No | Optional bool (default true). Load each offending asset and report which property holds each source ref (best-effort; the dependency list is authoritative). |