Hi, we are looking for advice on the ideal world/navmesh setup in WorldPartition based Main and sublevels (level instances)
Context:
- World
- We have a main level (I.e: WorldMap) (that is a WorldPartition level)
- Sublevels
- Our world is expected to consist of several sublevels (will exceed 16 sublevels)
- Each sublevel is a WorldPartition level itself
Our main goals are:
- Allow adding NavMeshBounds and building Navmesh within Sublevels (As our team rapidly iteration on sublevels)
- Of course availability of Navmesh in cooked builds

Problem:
- On cooked builds
- When UE load the world and is presented with sublevels that has Recast actors
- It registers them in a stack up to 16 recast actors
- Order is kinda random, determined by ActorIterator<ARecastNavMesh>
- Additional recast actors are dismissed (that exceeds the stack capacity)
- So, there’s a very strong chance that the main level’s recast actor won’t be the first to register, which fails AI systems relying on nav mesh availability
Solutions that we experimented:
-
1- Preventing designers from adding Navigation to sublevels
- Problems:
- Very prune to human error
- Hinders level designers workflow so badly
- Problems:
-
2- Inheriting NavigationSystemV1
- We overriden the functions (RegisterNavData and RequestRegistrationDeferred)
- Utilize the boolean ‘CanBeMainNavData’ on Recast actors (False on sublevels, True on main level)
- Add a Content Validation test to reassure the rules.
- Problems:
- After inspecting engine’s code, ‘CanBeMainNavData’ is safe to be utilized, but I believe it’s not safe, as we may interfere with some engine functionality in the future
-
3- Using DataLayers
- We have overriden the BuildPaths function anyway, so we added another step after the nav building process to add the generated recast actor to a Sublevel exclusion layer
- Then in main levels, we exclude loading this layer
- Add a content validation test to reinforce the rules.
- Problems:
- Even though this sounds the most compliant with UE, we are not sure if it’s the best approach.