要在场景中添加地形 (Terrain) 游戏对象,请从菜单中选择 GameObject > 3D Object > Terrain。此过程也会在 Project 视图中添加相应的地形资源。执行此操作时,景观最初是一个大型平坦的平面。地形的 Inspector 窗口提供了许多工具,可使用这些工具创建细节化的景观特征。
包含四个图标的工具栏上提供了雕刻和绘制地形、添加树和细节(如草、鲜花和岩石)以及更改所选地形的常规设置的选项。如需了解每个图标的更多信息,请参阅地形工具、树、草和其他细节和地形设置。
选择画笔图标可以访问绘制工具,这些工具允许您修改地形。使用光标可以雕刻地形的高度,或以各种方式将纹理绘制到地形上。光标采用所选画笔的形状;从几个内置形状中进行选择,或使用纹理来自定义画笔。还可以更改画笔的大小和不透明度(应用效果的强度)。然后,单击或拖动地形来创建不同的形状和纹理。
与在地形上使用画笔进行绘制的方式类似,您可以添加纹理、树和细节(比如草)。还可以创建其他连接的地形区块,更改整个区块的高度,甚至可以编写具有复杂效果的自定义画笔。
Terrain Inspector 具有以下键盘快捷键:
此外,标准 F 键击操作对于地形而言的作用略有不同。通常情况下,当光标位于 Scene 视图上时,按下此键会框选整个游戏对象。但是,由于地形通常非常大,因此按下 F 键时,__Scene__ 视图会聚焦到光标当前所在的区域。这种机制提供了一种非常快速且直观的方式来跳转到您想要编辑的地形区域。如果在光标不在地形区块上时按 F 键,则恢复为标准框选行为。
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.