可自动检测网格外链接 (Off-Mesh Link) 的一些用例。两个最常见的用例为:_掉下 (Drop-Down)_ 和_跳过 (Jump-Across)_。
为了自动找到跳跃位置,构建过程沿着导航网格的边缘行走,并检查跳跃的着陆位置是否在导航网格上。如果跳跃轨迹畅通无阻,则会创建网格外链接。
让我们来设置网格外链接的自动生成。如果您不熟悉导航网格烘焙,请查看构建导航网格。
首先,需要标记场景中的跳跃_起始位置_对象。为此,需要在 Navigation 窗口_中的 Objects_ 选项卡下选中 Generate Off-Mesh Links 选项。
第二步是设置掉下和跳过轨迹:
现在已经标记对象并调整了设置,因此该按 Bake 按钮了,随即自动生成网格外链接!当您更改场景并烘焙时,旧链接将被丢弃,并将根据新场景创建新链接。
如果未在所需位置生成网格外链接,请注意以下几点:
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.