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.
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.
Run
UnrealEditor <ProjectName> -run=ResavePackages -fixupredirectors
Note that the commandlet fails to delete the old StaticMesh package.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-203016 in the post.
0 |
Component | UE - World Creation - Worldbuilding Tools |
---|---|
Affects Versions | 5.0 |
Target Fix | 5.4 |
Fix Commit | 30419904 |
---|---|
Main Commit | 30419917 |
Created | Dec 19, 2023 |
---|---|
Resolved | Dec 20, 2023 |
Updated | May 27, 2024 |