Pathfinding unity


i want to implement a basic pathfinding system in my game. But i was wondering how to create a grid for the enemy to walk on. It can either be a grid(square) or a navmesh but i can't seem to find anywhere how to create them myself.

i've checked the A*pathfinding and angry ant but in both of them you just press some button and the grid gets created, i can't find the code that actualy does create the grid.

so could any1 tell me how to create a grid/navmesh.


Check out this tutorial for a quick start with using Navigation meshes with unity 3,5

Unity 3.5 beta has a complete NavMesh solution for you that can bake the navMesh and then have NavMeshAgents evolving around your mesh.

I made a quick tutorial for those interested in learning how to setup a basic AI pathfinding using NavMeshes in unity 3.5