Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

NavMeshSurfaces and Agent Types

Discussion in 'AI & Navigation Previews' started by Mystiq, Mar 13, 2017.

  1. Mystiq

    Mystiq

    Joined:
    Aug 31, 2013
    Posts:
    8
    This new NavMesh work basically saved my ass. The game I'm working on now requires dynamic updates so to have that ability in 5.6 is a life-saver. I do have one concern, though.

    Correct me if I'm wrong. In the old NavMesh system, you bake a mesh and then each NavMeshAgent can specify its own size for collision purposes. NavMeshSurfaces can only be baked for one agent at a time so now if I want to have different agent sizes, I need one NavMeshSurface per agent type. For most games, you'll have a different size for almost every unit type. If I want to update the mesh real time, this update time now basically scales linearly with my model count. This strikes me as a performance problem as well as a bit of a logistics mess as I'll have to have one NavMeshSurface component on my terrain for each agent.
     
    daisySa and Sarrivin like this.
  2. Sarrivin

    Sarrivin

    Joined:
    Dec 18, 2015
    Posts:
    22
    Yes, I think NavMesh(surfaces) should be working for one, multiple or all agents.
    If Unity added a possibility to reuse NavMesh for all agents that would be a step in a really important direction.

    If we have many types of units, like maybe 10 or 40, I imagine now we would need to have 10 or 40 NavMeshes in same places. That's absurd.