【Unity】Tilemap制作
基本步骤
- Create 2D Object -> Tilemap会为你创建一个Grid,在这张Grid上你可以铺设你的Tilemap。
- Window -> 2D -> Tilemap Palette (展示tile的“调色盘”),将美术素材拖入Tilemap Pallete,然后从中选取你所需要的tile,在Grid上的Tilemap中绘制
- 给绘制好的tilemap添加Tilemap 2D Collider,这样就能与游戏中的物体有碰撞效果了。
注
Sprites are the 2D graphic object used for character, props, projectiles and other elements of 2D gameplay.
为了方便美术素材的管理,通常多个sprite会合并入一个sprite,比如一套地图的tile合并入一个sprite。这个时候使用Sprite Editor来分割它们。同时注意Sprite textures with multiple elements need the Sprite Mode to be set to Multiple in the Inspector
在project view下选中一个sprite(不是Sprite的材质是没有Sprite Editor的),在inspector中打开Sprite Editor。