remove_orphaned_ofpa_actors
Delete ExternalActors (OFPA) orphan packages after re-verifying each path; dry-run by default, refuses unconfirmed or loaded orphans.
Instructions
Honest-gated deletion of ExternalActors (OFPA) orphan packages. Every entry in actor_paths is RE-VERIFIED against a fresh 3-layer scan (never trusts the caller's list, e.g. from a stale list_orphaned_ofpa_actors call) -- only a definitive classification='confirmed_orphan' is eligible for deletion; anything else (candidate_unconfirmed / registered / registered_no_file / unknown) is refused regardless of dry_run/force_save. dry_run DEFAULTS TO TRUE (deliberate deviation from a delete-by-default signature: editor crashes around OFPA + World Partition actor deletion are documented, and this tool is unexercised) and is ALWAYS forced to true -- no override parameter exists for this -- when map_path is the CURRENTLY OPEN editor world; open a different map first to actually delete (the recommended cleanup procedure). Deletion (when dry_run=false) is raw file removal of the .uasset (+ sibling .uexp/.ubulk), NOT ObjectTools::ForceDeleteObjects on a bare AActor package -- that path is untested here for a standalone-loaded actor with no owning level, and is plausibly part of why in-editor OFPA actor deletion crashes; a package still loaded in memory is refused unless force_save=true.
Returns: { map_path, requested_count, refused_active_world, dry_run, would_delete: [{path, generated_class_name, is_loaded}], deleted: [{path, deleted, error?}], refused_not_orphan: [{path, classification, reason}], refused_loaded: [{path, reason}], deleted_count, note }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Default true. When true (or forced true by the active-world gate), nothing is deleted; would_delete reports what WOULD be removed. Pass false to actually delete. | |
| map_path | Yes | Long package name of the level whose orphans to remove (e.g. /Game/MyGame/Maps/MainMap). | |
| force_save | No | Default false. Only meaningful when dry_run=false: permits deleting a candidate that is currently loaded in memory (is_loaded=true). Never overrides the confirmed_orphan re-verification requirement or the active-world gate. | |
| actor_paths | Yes | Array of external-actor PACKAGE path strings to remove (the 'path' field from list_orphaned_ofpa_actors). |