Search Unity

RuntimeNavMeshBuilder: Source mesh Combined Mesh (root: scene) does not allow read access.

Discussion in 'Navigation' started by roseportalgames, Nov 15, 2018.

  1. roseportalgames

    roseportalgames

    Joined:
    Aug 9, 2017
    Posts:
    121
    Hey guys, I'm getting this error when I run Bake on a NavMeshSurface:

    Code (CSharp):
    1. RuntimeNavMeshBuilder: Source mesh Combined Mesh (root: scene) does not allow read access. This will work in playmode in the editor but not in player
    2. UnityEngine.AI.NavMeshSurface:BuildNavMesh()
    3. <RebuildingNavmesh>c__Iterator7:MoveNext() (at Assets/Scripts/Minigame1/SecurityGame.cs:661)
    4. UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    5. SecurityGame:RebakeNavmesh() (at Assets/Scripts/Minigame1/SecurityGame.cs:656)
    6. <PlacingFence>c__Iterator8:MoveNext() (at Assets/Scripts/Minigame1/SecurityGame.cs:695)
    7. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    As far as I can tell there's no "combined mesh" in my scene (what is that, even?). If so, how could I find it..? I know that sounds stupid but there's just a few meshes turned on in my scene and upon looking at them I can't find "Combined" anywhere. I also have a cube (the ground with the NavMeshSurface) and a terrain (this is just for background visuals, it's not on the layer used by the NavMeshSurface).
     
  2. Yandalf

    Yandalf

    Joined:
    Feb 11, 2014
    Posts:
    373
    You are somehow trying to change the combined mesh, which is stored in memory when you initialize your navMesh. Can you show the code in SecurityGame of the methods that contain the highlighted lines? (661, 656, 695)
     
  3. HorusVision

    HorusVision

    Joined:
    Jun 7, 2018
    Posts:
    3
    Is the object marked as static? I got this error while trying to build a navmesh out of multiple level objects (a ground plane and some buildings). I turned off static for all of the objects (and their children) and the error went away.
     
  4. craig4android

    craig4android

    Joined:
    May 8, 2019
    Posts:
    70
    having the same Problem, it does work if I use "Physics Colliders" as "use Geometry" option. But actually I want to use "Render Meshes"