Some use cases for OffMesh Links can be detected automatically. The two most common ones are: Drop-Down and Jump-Across.
In order to find the jump locations automatically, the build process walks along the edges of the NavMesh and checks if the landing location of the jump is on NavMesh. If the jump trajectory is unobstructed an OffMesh link is created.
Let’s set up automatic OffMesh Link generation. If you’re not familiar with NavMesh baking, take a look at Building a NavMesh.
First, the objects in the Scene where the jump can start from needs to be marked. This is done my checking Generate OffMesh Links option in the Navigation Window under Objects tab.
第二步是设置掉下和跳过轨迹:
Now that objects are marked, and settings adjusted, it’s time to press Bake and you have will have automatically generated OffMesh links! When ever you change the scene and bake, the old links will be discarded and new links will be created based on the new scene.
Things to keep in mind if OffMesh links are not generated at locations where you expect them to be: