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.

How to bake navmesh on randomly generated map tiles?

Discussion in 'Navigation' started by Rayge, Feb 5, 2016.

  1. Rayge


    Sep 23, 2015
    I'm trying to randomly spawn a bunch of flat tiles (each tile has some sort of obstacle) and I want to create a navmesh on each tile so I can have enemy objects move around on each tile. Is this possible and if so, how do I do it?

    So far, I've tried baking navmesh data on each tile while adjusting the agent radius and voxel size to as small as possible so the mesh stretches from edge to edge of each tile, but it takes time to bake. I've even tried using a simple flat plane object and baking the navmesh data but nothing seems to work.
  2. clownhunter


    May 26, 2013
    I accomplished this by having the procedurally added walls be navmesh obstacles and then the NavMesh will build up around them at runtime so no need to bake data for each tile. Here's a project I was working on that used this technique: