ResavePackagesCommandlet -fixupredirects fails to fixup pointers from external actors that are pointing to objectredirectors.
It fails to fixup those pointers because we specifically skip loading of ExternalActor packages in the ResavePackagesCommandlet:

	// Filtering out external actors/objects here avoids any issues that could happen with loading and saving them individually. They are instead handled within the context of their owning level in UResavePackagesCommandlet::PerformAdditionalOperations. For specifically resaving a World Partition map and its actors, see WorldPartitionResaveActorsBuilder.
	PackageNames.SetNum(Algo::RemoveIf(PackageNames, [](const FString& PackageName)
		return PackageName.Contains(FPackagePath::GetExternalActorsFolderName()) || PackageName.Contains(FPackagePath::GetExternalObjectsFolderName());

That filter was added in CL 25543439, and is still necessary.

We have custom commandlets to resave all actors (WorldPartitionResaveActorsBuilder for WP worlds and ExternalActorsCommandlet for OFPA worlds). These will fixup redirectors. But to support ResavePackagesCommandlet, it will need special code to handle loading and saving external actors.

Steps to Reproduce

Create a StaticMeshActor in a WorldPartition Level.
Point the Actor to a newly created StaticMesh.
Save the level, save the mesh.
Restart the editor.
Without loading the level, rename the StaticMesh; it will leave a redirector.
Save the old (now a redirector) and new StaticMesh packages.

UnrealEditor <ProjectName> -run=ResavePackages -fixupredirectors

Note that the commandlet fails to delete the old StaticMesh package.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-203016 in the post.

Login to Vote

ComponentUE - World Creation - Worldbuilding Tools
Affects Versions5.0
Target Fix5.4
Fix Commit30419904
Main Commit30419917
CreatedDec 19, 2023
ResolvedDec 20, 2023
UpdatedMay 27, 2024
View Jira Issue