在 Tile Palette 窗口中使用选定的瓦片来创建面板,这些面板可用于在瓦片地图上进行绘制。从菜单 Window > 2D > Tile Palette 中打开 Tile Palette 窗口。
通过选择 Create New Palette 创建新的面板。
在 Create New Palette 窗口中提供了以下选项。
属性 | 功能 |
---|---|
名称 | 为创建的瓦片面板资源提供一个名称。 |
Grid | 选择要将创建的瓦片面板绘制到的网格布局。 |
Rectangle | 如果要为默认矩形瓦片地图创建面板,请选择此选项。 |
Hexagon | 如果要为六边形瓦片地图 (Hexagonal Tilemap) 创建面板,请选择此选项。 |
Isometric | 如果要为等距瓦片地图 (Isometric Tilemap) 创建面板,请选择此选项。请参阅创建用于等距瓦片地图的瓦片面板以了解更多信息。 |
Isometric Z as Y | 如果要为 Isometric Z as Y Tilemap 创建面板,请选择此选项。请参阅创建用于等距瓦片地图的瓦片面板以了解更多信息。 |
* Hexagon Type (仅当 Grid 类型设置为 Hexagon 时可用) |
选择要将瓦片面板绘制到的六边形瓦片地图的类型。请参阅有关六边形瓦片地图的文档以了解更多信息。 |
Cell Size | 要将瓦片绘制到的单元格的大小。 |
Automatic | Cell Size 以 Unity 单位自动设置,并基于用于创建瓦片资源的精灵的大小。如果有多个瓦片,则会调整 Cell Size 以匹配面板左下角的第一个瓦片,使其完全适合单元格。 |
Manual | 选择此选项可输入自定义大小值。 |
提供面板名称,然后选择 Create 按钮。选择一个文件夹来保存面板资源文件。新创建的面板会自动加载。
将 Assets 文件夹中的__纹理__或__精灵__拖放到瓦片面板 (Tile Palette) 上。选择要保存新瓦片资源的位置。在所选文件夹中将生成新的瓦片资源,并会将瓦片放置在瓦片面板上。
请使用以下快捷方式导航面板窗口。
快捷方式 | 功能 |
---|---|
单击瓦片 | 选择瓦片 |
在多个瓦片上拖动 | 选择多个瓦片 |
Alt + 左键拖动 | 平移 |
滚轮键拖动 | 平移 |
旋转滚轮键 | 放大/缩小 |
Z Position 画笔编辑器位于 Tile Palette 窗口底部。在此编辑器中可以编辑瓦片的 Z 轴值;在 Z as Y Tilemap 上进行绘制时可使用此设置来调整瓦片高度。请参阅有关在瓦片面板中调整瓦片高度的文档以了解更多信息。
用于在瓦片地图上绘制瓦片的面板工具也可用于在面板本身中编辑瓦片的放置位置。从下拉菜单中选择一个面板,然后单击 Edit 将面板解锁以进行编辑。
请参阅关于在瓦片地图上绘制的文档,了解同样可用于编辑面板的面板工具快捷方式和功能。
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.