When cooking a level, if actor is in OFPA level, UChildActorComponent::CreateChildActor sets Params.OverridePackage to non-null value (a UPackage in ExternalActors subdir that contains the owner actor) and calls UWorld::SpawnActor. Since SpawnParameters.OverridePackage is non-null, this function sets bNeedGloballyUniqueName flag and passes it to FActorSpawnUtils::MakeUniqueActorName - which uses FActorGUIDGenerator to generate a name for a new actor, which builds a GUID using machine’s MAC address (bad news for deterministic cooks) and current timestamp (complete disaster for deterministic cooks).
Sure - please see attachment - it contains a simple level and two actors. Actually, given that it’s an OFPA level, I’m not sure how helpful it would be - some part of the level is stored somewhere in external-actors dir with unknown hashed name.
While preparing this repro case, I’ve realized that a critical thing missing in my original steps was to ensure that level is saved *without child actor*, so more specific steps to reproduce would be:
Create two empty actor blueprints (Test_ActorChild and Test_ActorParent in my example)
Create new level, save (call it Test_Map), then enable OFPA (confirm conversion to external actors), drag an instance of Test_ActorParent, save again and close (load some other level instead)
Open Test_ActorParent, add ChildActorComponent and assign Test_ActorChild as an actor to spawn.
Cook in diff-only mode (-run=Cook -TargetPlatform=Windows -Unversioned -diffonly -cooksinglepackagenorefs -package=/Game/Test_Map)
Observe the diffs.
If you set up the actor blueprint before adding to the level, it would be stored with an instance of Test_ActorChild, so on cook it would try to preserve the name.
Thanks for sharing the extra details. I logged an internal bug report for the team to review this problem. You will be able to follow its evolution here: https://issues.unrealengine.com/issue/UE\-365939