I’ve noticed a strange bug in my game when I switch between scenes. The NavMesh surface I have in my first sandbox is overlaid in my second scene, sandbox 2. In the main menu I have both the NavMesh data from the first and second scene, and in these two scenes I can only get rid of it with this line of code, so all the data:
NavMesh.RemoveAllNavMeshData();
There is no overlapping in the first scene.
If I try to re-bake the surface from scratch in all scenes, it runs fine on the first run, there is no problem with it, but as soon as I play it again, I reproduce the error this way:
This is the Main Menu:
This is the Sandbox 2:
I’m grateful for any help