Description

From Licensee:

You can reproduce this in stock by doing the following:

  1. Make a new 5.1 project with a new WP map (it can be empty)
  2. Put some actors in some folders in the outliner and save them/reload the map
  3. PIE, notice you only get warnings about DoesPackageExist being called on packages in memory (a fix for this would be nice as well) and the outliner works as expected.
  4. Quit PIE and dirty some actors in some folders in the outliner (_don't save them)_
  5. PIE again, notice you will get warnings about actors using actor folders when they are aren't in use and the dirty actors won't appear in the correct location in the outliner.

 

The issue appears to stem from how unsaved actors are put into the PIE world and how folders are fixed up for sublevels setup for PIE in WP when loading actors.

Normally actor folders are fixed up in the FWorldPartitionLevelHelper::LoadActors function, specifically from the SrcActorFolderPath optional variable and the code surrounding it. Unsaved actors however (seemingly, I haven't fully debugged the code) get added to the world differently and do not run this code- they instead retain the FolderGuid from the editor world (/and it's not fixed up anywhere to use a path) and then it causes a warning and is cleared by the code in AActor::FixupActorFolder (executed from this chain of function calls: UWorldPartitionLevelStreamingDynamic::FinalizeRuntimeLevel -> ULevelStreaming::SetLoadedLevel -> ULevel::OnLevelLoaded -> ULevel::FixupActorFolders -> AActor::FixupActorFolder).

 

We originally thought this was just a logging bug and tested fixing it by setting bFixupActorFoldersAtLoad to false on the RuntimeLevel in UWorldPartitionLevelStreamingDynamic::FinalizeRuntimeLevel for PIE worlds (as those generated levels aren't using actor folders). However as we have dug into this we have realized that that actual problem is dirty actors not getting their actor folders fixed up in the same way as normally loaded actors do in the FWorldPartitionLevelHelper::LoadActors function so setting bFixupActorFoldersAtLoad to false on PIE RuntimeLevels is probably bad. A proper fix for this would be appreciated.

Steps to Reproduce

You can reproduce this in stock by doing the following:

  1. Make a new 5.1 project with a new WP map (it can be empty)
  2. Put some actors in some folders in the outliner and save them/reload the map
  3. PIE, notice you only get warnings about DoesPackageExist being called on packages in memory (a fix for this would be nice as well) and the outliner works as expected.
  4. Quit PIE and dirty some actors in some folders in the outliner (don't save them)
  5. PIE again, notice you will get warnings about actors using actor folders when they are aren't in use and the dirty actors won't appear in the correct location in the outliner.

Have Comments or More Details?

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

1
Login to Vote

Fixed
Fix Commit24780618
Main Commit24780618
CreatedMar 20, 2023
ResolvedMar 27, 2023
UpdatedAug 24, 2023