Search Issue Tracker
Active
Under Consideration for 2022.3.X, 6000.0.X, 6000.2.X, 6000.3.X, 6000.4.X
Votes
0
Found in
2022.3.68f1
6000.0.62f1
6000.2.11f1
6000.3.0b9
6000.4.0a4
6000.5.0a1
Issue ID
UUM-126707
Regression
No
NavMeshManager.LoadData takes a long time and causes performance spikes when enabling a NavMeshSurface with already instantiated NavMeshLinks
Reproduction steps:
1. Open the attached “NavMeshLinksEx.zip” project
2. Open the “16_WindPalaceOutdoor_Camera” scene
3. Add “scene 17_WindPalaceIndoor_Camera” scene to the Hierarchy
4. Enter Play mode
5. From the Hierarchy, select “NavmeshGroup16” GameObject
6. In the Inspector, click on the “Spawn all NavLinks” button (second to last in the list)
7. Wait for a few seconds for all NavMeshLinks to load
8. Open the Profiler window and start profiling (Window > Analysis > Profiler + F9)
9. From the Hierarchy, select “NavmeshGroup17” GameObject
10. In the Inspector, click on the “Activate All NavmeshSurfaces” button (last button)
11. Wait for a few seconds for all NavMeshSurfaces to activate
12. Stop profiling in the Profiler window
13. Open the Profile Analyzer window (Window > Analysis > Profile Analyzer)
14. Click the “Pull Data” button
15. In "Name Filter", type in "NavMeshManager.LoadData"
16. Find and select frame with highest cost
17. In the Profiler Hierarchy find the frame and input “NavMesh.ConnectOffMeshConnection” in the search bar
18. Observe the “Calls” and “Time ms” values
Expected result: No spike in “Calls” and “Time ms” values is observed
Actual result: “NavMesh.ConnectOffMeshConnection” is called above 120k times and the Time is around 50ms
Reproducible with: 1.1.7 (2022.3.68f1), 2.0.0 (6000.2.9f1), 2.0.9 (6000.0.62f1, 6000.2.11f1)
Couldn’t test with: 2.0.9 (6000.3.0b9, 6000.4.0a4, 6000.5.0a1) - “error CS0592: Attribute 'SerializeField' is not valid on this declaration type. It is only valid on 'field' declarations.” prevents from entering play mode
Notes:
- None of the NavMeshData from the NavmeshSurfaces have OffMeshLinks
- In the repro above, none of the instantiated NavMeshLinks are used for the NavMeshSurfaces activated in scene 17_WindPalaceIndoor_Camera
- If we enable the NavMeshSurfaces without any NavMeshLinks in the scene, there are no calls to ConnectOffMeshConnection and the CPU load is very low
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shader graph node does not update to red when there is a precision mismatch between the base graph and the subgraph
- Gaps between fields cause accidental element selection when pointing slightly above or below "Element ..." text in a list of elements
- UI flickering in Unity Version Control when the merge options are opened
- Build for iOS with UnityAds fails with linker failures when performing a CocoaPods build
- NavMeshManager.LoadData takes a long time and causes performance spikes when enabling a NavMeshSurface with already instantiated NavMeshLinks
Add comment