A Unity package that enhances the NavMesh Surface baking process. Currently it only adds support for Terrain Trees.
Important
You need Unity's AI Navigation package. When you install this package, it should depend on it and install it automatically for you.
Install the package according to the installation instructions. Once installed, you can use the extra buttons from the NavMesh Surface to use this package to bake.
- Make real instances of terrain trees for baking (they get removed after baking). These trees support the following components:
- LOD Groups, only used when Use Geometry is set to Render Meshes, takes precedence to just a Mesh Renderer and Mesh Filter on the root object of a tree
- Mesh Renderer and Mesh Filter, only used when Use Geometry is set to Render Meshes, #Problems that may not be obvious
- Colliders of any type, can be multiple, mix and matched, only used when Use Geometry is set to Physics Colliders
- NavMesh Modifier
- NavMesh Modifier Volume
Important
All components above need to be enabled to be used by the NavMesh Surface.
Important
Both a Mesh Renderer and Mesh Filter need to be on the tree, otherwise the Surface will not recognise it.
Open the Package Manager window, click on Add Package from Git URL ..., then enter the following:
https://github.com/lajawi/unity-navmesh-better-bake.git
Tip
Head to the Unity documentation for help if need be. https://docs.unity3d.com/Manual/upm-ui-giturl.html
Add the following line to your project's Packages/manifest.json:
"com.github.lajawi.betternavmeshbake": "https://github.com/lajawi/unity-navmesh-better-bake.git"