Search Unity

Slow performance baking nav mesh at runtime

Discussion in 'Navigation' started by emrys90, Jul 11, 2017.

  1. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    I'm having some performance issues, it takes around a minute for it to bake the first time, and around 2-3 seconds to update after that when something changes. I have a 2k mesh based terrain, and around 40k NavMeshSourceTag primitive colliders. Is there anything I can do to get those faster? I'm trying to switch over to this from A* pathfinding asset, and in there it bakes the entire scene at runtime in around 10-15 seconds. I'd like to get it similar in time to that.
     
    io-games likes this.
  2. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Anyone?
     
  3. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    There is nothing you can currently do about it. I have similar problems (especially for updating at runtime, which is needed in my game. Those optimization have to be made by Unity. Opening up the navmesh low level API might be another possibility. Unfortunately the Navmesh API does not seem to have a high priority, haven't found anything in their roadmap. :(.
     
  4. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Okay thanks. Was mainly wanting to make sure I wasn't doing something wrong.
     
  5. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    You could try the newest beta 2017.2b10 or b11 (https://unity3d.com/de/unity/beta) if you haven't yet switched to A*. The version has some decent performance improvements, which solved my problem. I haven't manipulated the navmesh, just changed some movement costs which works fine now.