Search Unity

Bug [SOLVED] Shared NavMesh Data between different scenes

Discussion in 'Navigation' started by nyunesu, Oct 19, 2020.

  1. nyunesu

    nyunesu

    Joined:
    Mar 20, 2018
    Posts:
    5
    The latest NavMesh to be baked overrides the other scene's NavMesh bake.

    Apparently both NavMeshes are linked somehow.
    This is a brand new project that I made to test this problem (tested with 2019.4 & 2020.1)



    Can't solve this, I need help.

    - I've tried to delete the cached NavMesh asset from project and regenerate
    - Deleted all NavMesh data through script
    - Tried to manually set another fileID to the navmesh
    - Tried deleting a scene and copying components to a new scene
    - Tried creating a new project
     
  2. QuantumMMX

    QuantumMMX

    Joined:
    Feb 13, 2020
    Posts:
    1
    Hi! I was wondering if other things come into play. I'm kinda new with NavMeshes so this might be on me. But I'm having pretty much the same problems you showed in the video, yet I've disabled Enter Play Mode already and it didn't solved the problem. I searched if it could be fixed at runtime with some new update to the NavMesh system. Yet I couldn't find anything related to it. I've been kind of stuck with this for a while, yet this post has been the most similar to my issue. If you know any extra info that could give me some insight on how to solve it I would really appreciate it!
     
  3. Entomophagus

    Entomophagus

    Joined:
    Mar 30, 2022
    Posts:
    11
    Okay, I had exactly the same issue and it was not nyunesu's solution either. After much, much frustration, I figured it out.

    In my case, the problem was that I was baking the navmesh while also having another scene loaded additively. Because the other scene was abstract (in the sense of system/UI, no 3D environment), I didn't really pay attention to it. Turns out that the baked navmesh got associated with that scene as well as the intended scene, and when I then baked in the second environment scene (with the same system/UI scene still open), it overwrote the first navmesh because that was still present, attached to the system/UI scene. That in turn completely eliminated the old navmesh and when I looked back at the first environment, the navmesh that I saw was the one actually attached to the system/UI scene.

    So maybe, if you, out there, are struggling with the same issue, try unloading all other additive scenes before baking each map.
     
    flashframe likes this.