Create Neighbor Terrains 工具用于快速创建自动连接的相邻地形区块。在 Terrain Inspector 中,单击 Paint Terrain 图标,然后从地形工具列表中选择 Create Neighbor Terrains。
选择此工具时,Unity 会突出显示光标所在的地形区块周围的区域,指示可以放置新连接区块的空间。单击任何可用空间即可创建另一个地形区块。Editor 在与所选地形相同的组中创建新的地形区块,并复制其连接到的区块的设置。此外还创建一个新的 TerrainData 资源。
默认情况下,Unity 在地形区块的 Terrain Settings 中启用 Auto connect。启用 Auto connect 后,地形系统会自动管理相邻地形区块之间的连接,并且区块会自动连接到具有相同 Grouping ID 的所有邻居。
如果更改 Grouping ID__,或者为一个或多个区块禁用 Auto connect__,则可能会丢失区块之间的连接。要自动重新创建地形区块之间的连接,请单击 Reconnect 按钮。仅当两个相邻的区块具有相同的 Grouping ID 并且两个区块都启用了 Auto connect 的情况下,__Reconnect__ 才会连接这两个区块。
通过连接一个组中的地形区块,可以使用其他工具绘制纹理或以无缝方式调整该组的高度贴图。在运行时,地形系统会自动混合所连接区块的曲面细分和法线贴图,以确保这些区块显示为单个地形,不会由于发散法线而产生的接缝或瑕疵。
如果尝试通过一次笔划在两个未连接的区块之间绘制,Unity 会将这些区块视为单独的区块,因此应用的任何效果可能仅显示在一个区块上,或者在每个区块上显示结果不同。
2019–01–29 页面已修订并进行了编辑审查
在 2018.3 版中更新了功能
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.