Version: 2020.2
Tilemap workflow

创建瓦片地图 (Tilemap)

A Tilemap is a GameObject you place your selected Tiles on. Create a default (rectangular) Tilemap by going to GameObject > 2D Object > Tilemap. If you do not have these options, then the 2D Tilemap Editor package may not be installed. If so, download the 2D Tilemap Editor package from the Package Manager.

Select the ‘Tilemap’ option to create the default rectangular Tilemap. Refer to the respective pages for Hexagonal and Isometric Tilemaps for more information on their uses and their options.

选择 Tilemap 选项后,在场景中将会创建一个新的 Grid 游戏对象,其中包含 Tilemap 子游戏对象。Grid 游戏对象决定了其子 Tilemap 的布局。

Tilemap 子游戏对象由 Tilemap 组件和 Tilemap Renderer 组件组成。Tilemap 游戏对象是绘制瓦片的地方。

Create additional Tilemaps by selecting the Grid GameObject or the Tilemap GameObject, and then go to the menu: GameObject > 2D Object > Tilemaps, or right-click on the selected GameObject and go to 2D Object > Tilemap to add another Tilemap as a child to the same parent Grid.

Once the Tilemap(s) are created, adjust the Grid property settings to adjust the properties of its Tilemap children, such as Cell Size or the type of layout of the child Tilemaps. These also affects attached components such as the Tilemap Renderer and Tilemap Collider 2D components.

  • Page content and screenshots updated for 2020.1 NewIn20201
  • 2D Tilemap Editor 不再随 Editor 安装过程一起安装,而是必须从 Package Manager 下载。2019.2 NewIn20192
  • 2017.2 版中添加了瓦片地图 NewIn20172
Tilemap workflow