0

Earlier, it was NavMeshBuilder, but with version 5.5 there is no such a class.

How can I bake NavMesh in code in editor mode ?

EDIT 1

I do not want to bake navmesh at runtime. All I want to do is bake navMesh in editor mode(NOT PLAY MODE) BY THE MY CODE AND NOT BY THE NAVIGATION TAB. Is it still possible ? Just call method that builds nav mesh.

Community
  • 1
  • 1
Vladyslav Khromykh
  • 757
  • 1
  • 5
  • 20
  • Either I don't get the question or this is what you're looking for https://docs.unity3d.com/Manual/nav-BuildingNavMesh.html – Jonas Grumann Dec 14 '16 at 14:48
  • @JonasGiuro The thing is, that I can bake nav mesh in editor by button in special window. But I need to bake it in code. And earlier, there was such ability with NavMeshBuilder class. – Vladyslav Khromykh Dec 14 '16 at 14:52
  • seems like there's no way of doing it with the build in navmesh system right now: https://unity3d.com/unity/roadmap maybe using a third party solution from the asset store or roll your own would be the way to go. – Jonas Grumann Dec 14 '16 at 15:05
  • You can't bake in runtime, but you can disable your static objects temporarily, bake the navmesh, and then add a navmesh obstacle to your objects and use the carve option which can carve shapes out of the navmesh essentially getting the same result – Garren Fitzenreiter Dec 14 '16 at 17:47
  • It is still there in 5.5 https://docs.unity3d.com/ScriptReference/AI.NavMeshBuilder.BuildNavMesh.html – MiningSam Dec 14 '16 at 21:40
  • 1
    Also, without using an example script, it is quite difficult to see what you might be doing wrong or missing. – MiningSam Dec 14 '16 at 21:42
  • Please include the code you tried that did not work in 5.5 that used to work in earlier versions, if you don't your question will likely be closed for not having enough details about the problem. – Scott Chamberlain Dec 14 '16 at 22:10

1 Answers1

1

I was not right in new path of NavMeshBuilder. I searched for it in UnityEngine.AI but now it in UnityEditor.AI

Vladyslav Khromykh
  • 757
  • 1
  • 5
  • 20