下文将详细介绍在__瓦片地图__上绘制__瓦片__的步骤和工具。但是,如果要绘制等距瓦片地图,请参阅创建用于等距瓦片地图的瓦片面板以了解具体步骤和信息。
要开始绘制瓦片,请从 Tilemap Palette 窗口中的 Active Tilemap 下拉选单中选择要绘制瓦片的瓦片地图。场景层级视图中创建的瓦片地图会自动添加到下拉菜单中。只有选定的有效瓦片地图 (Active Tilemap) 会受瓦片面板 (Tile Palette) 绘制工具的影响。
瓦片地图绘制工具位于 Tile Palette 窗口顶部的一行中。这些工具也用于编辑瓦片面板 (Tile Palette) 本身。
工具 | 快捷键 |
---|---|
![]() |
S |
![]() |
M |
![]() |
B |
![]() |
U |
![]() |
I |
![]() |
D;或在使用__画笔工具__或__框填工具__时按住 Shift。 |
![]() |
G |
使用__选择工具__可选择有效瓦片地图上的瓦片,或按住并在多个瓦片上拖动来一次选择多个瓦片。所选瓦片的属性详细信息将显示在 Inspector 窗口中。使用移动工具可将所选的瓦片移动到瓦片地图上的另一个位置。
使用__移动工具__按住并将所选瓦片拖动到瓦片地图上的另一个位置。
使用__画笔工具__选择瓦片地图面板 (Tilemap Palette) 中的瓦片,或按住并在多个瓦片上拖动来一次选择多个瓦片。然后单击场景中瓦片地图上的任何位置即可开始使用所选的瓦片进行绘制。使用__画笔工具__时按住 Shift 可切换到橡皮擦工具
要使用瓦片地图上已有的瓦片而不是__瓦片地图面板 (Tilemap Palette)__ 进行选择和绘制,请在使用__画笔工具__在瓦片地图上选择瓦片时按住 Ctrl。此时将快速切换到选取器工具以便选择用于绘制的瓦片。
使用__框填工具__选择瓦片地图面板 (Tilemap Palette) 中的瓦片,或按住并在多个瓦片上拖动来一次选择多个瓦片。使用其他绘制工具进行的选择也有效。
按住__矩形工具__并在瓦片地图上拖动来绘制一个矩形形状,其中会以选定的瓦片进行填充。
使用__选取器工具__从瓦片地图或瓦片地图面板选取瓦片;按住并在多个瓦片上拖动可一次选择多个瓦片。进行选择后,活动工具将切换到__画笔工具__,从而允许使用选定的瓦片立即在瓦片地图上绘制。
使用__橡皮擦工具__可从瓦片地图中删除瓦片,只需在启用该工具时选择要删除的瓦片即可。要一次性擦除更大的区域,请按住__橡皮擦工具__,然后根据所需大小在瓦片地图面板中拖动该工具。
__填充工具__使用选定的瓦片填充连续的相同瓦片区域或空单元格。通过从瓦片地图面板中选择瓦片,选择要用于填充的瓦片。此工具不能选择多个瓦片。
使用瓦片地图焦点 (Tilemap Focus) 模式可聚焦特定的瓦片地图或网格游戏对象,并淡出场景中的其他游戏对象。在处理多个瓦片地图层时非常有用,可以避免混淆和混乱。
首先从 Tilemap Palette 窗口或 Hierarchy 窗口的 Active Target 下拉选单中选择目标瓦片地图。Tilmap Focus On 下拉菜单位于 Scene 视图的右下角。
在下拉菜单的选项中选择 Focus On 目标:
目标 | 功能 |
---|---|
无 | 不选择目标。 |
Tilemap | 聚焦于选择的瓦片地图游戏对象。所有其他游戏对象都消失。选择此选项可将焦点仅集中在单个瓦片地图层。 |
Grid | 聚焦于父网格游戏对象及其所有子项。所有其他游戏对象都消失。选择此选项可将焦点集中在整个瓦片地图上,并将所有层作为一个整体。 |
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.