WorldPartition Unloaded datalayer still affects navmesh

I noticed a bug with the navmesh generation when actors are in a Datalayer that is unloaded : some unloaded actor still affect the navmesh. Reloading the level sometimes fixes the issue and sometimes it only make some unloaded actors not affect navmesh and some affect navmesh. It’s really confusing.

What I expect: The navmesh should not be affected by actors in an Unloaded DataLayer.

Steps to Reproduce

  • Create a WorldPartition level with navmeshBoundsVolume + RuntimeDataLayer
  • Place Actors Affecting navigation in the Datalayer and Save the level
  • Uncheck the DataLayer to unload it
  • Observe the navmesh is still affected by the unloaded actors.

In your videos, it looks like the navmesh replaces some of the meshes from the data layer after it is unloaded. Can you try running the console command ai.debug.nav.DumpRepositoryElements? We encountered an issue in 5.5 where garbage components could end up registered in the octree and object repository where they were not being cleaned up properly. A few CLs have been submitted to correct this, but I am very curious if it is also what is happening in your level since not all data layer actors are punching holes in the navmesh. You can alternatively enable Draw Octree and Draw Octree Details on the navmesh actor in the scene to see if boxes are still drawn for where the hole in the navmesh continues to exist.

-James

Thanks for your quick answer. I also have the issue in 5.6. By enabling Draw Octree and Draw Octree Details I can see the Actors’ boundingbox punching holes

[Image Removed]I tried running the console command ai.debug.nav.DumpRepositoryElements and didn’t fix the issue. I attached the output log of: running the command with the DataLayer loaded, unloading the DataLayer, running the command again, Building the navmesh manually.

P.S. I use the Grouping of actors and it seems to be related

I have a 100% repro by pasting this group of actors in a dataLayer named NewDataLayerAsset :

I am seeing that in 5.6 as well. But I only see it when pasting in the values that you sent over. In the Outliner, I also see that the cubes are not grayed out with (Unloaded Datalayer) next to the names like other cubes in the same data layer. It appears grouping/ungrouping the cubes has no effect either. I am going to loop in a colleague who specializes in our World Creation tools to see if he may know why the actors are not being unloaded with the datalayer.

-James

Hello,

In a WP level, actors can be pinned to keep them from being unloaded (editor only). You can find the actors that are pinned in the scene outliner pinned column. Dirty actors that are saved without having any references to them will be automatically pinned. Dirty actors prior to being saved are also never unloaded to ensure that no changes are lost. So, the new actors that you’re spawning remain loaded as they’re dirty or don’t have anything referencing them upon saving, which pins them.

p.s. Epic employees will be out of the office for the next couple of weeks (6/30 - 7/11) and won’t be able to respond during that period.

Thanks,

Ryan

[mention removed]​ & [mention removed]​ Thank you for your insights. The actors causing the issue are not pinned down, the level is saved and the actors are not dirty.

I found a 100% repro without pasting the values. Add actors in the level with the DataLayer active, group-them, duplicate them with Alt+Mouse-Drag on the gizmo, save, unload the datalayer, observe the holes in the navmesh.

Strange. I’ll investigate this further and try to get back to you within the week.

-Ryan

Bonjour Jeremie,

Sorry for the delay on this case. After further investigation, you are running into 2 separate bugs that affect the generation of the nav mesh.

1- Create an instance and assign to a DataLayer: The problem is that the original instance is still around but invisible (AActor::IsHiddenEd() == true). This is related to the actor being dirty and pinned. Saving the level is enough to get the actor to be destroyed which results in a proper Nav Mesh generated. It is still a bug as the invisible actor should not be used in the NavMesh generation. You also need to save the level 2x as the first save will still get the wrong nav mesh since the Actor is still around. Unreal Engine Issues and Bug Tracker (UE\-309466)

2- Group actors: This one still requires further investigation but one of the problem is that duplicating a group that is part of a DL results in the new sub-actors being part of the DL but the new Group is not. This forces pin the sub-actors. The workaround is to add the Group to the DL and save. https://issues.unrealengine.com/issue/UE-309467

The bugs should appear on the public tracker in the coming days.

Regards,

Martin

Thank you for the investigations :slight_smile:

I will find a workaround in the meantime to ensure the groups are in the DL