![]() You will notice that moving SpriteCharacter onto the MetalCube will hide the MetalCube. This will mean the Tilemap will appear behind SpriteCharacter.Ĭlick Play above Scene and move SpriteCharacter through the world using the arrow keys! Step 4 - Adding GameObjectsĬreate a new folder in Assets and call it Environment.ĭrag and drop MetalCube.png into Assets -> Environment.Ĭlick play and move SpriteCharacter around the MetalCube! To fix this, go to the Hierarchy and select the Tilemap object.Ĭhange the Order in Layer field to -10. You may notice that SpriteCharacter no longer appears. Repeat step 2 for any further sprites you want to use in your world! Step 3 - Painting Your Worldĭrag your Tile Palette to be next to the hierarchy.Ĭlick on a Tile in the Tile Palette to select it.Ĭlick in the Scene view to paint the world with your selected tile! Click Slice.īy doing this, 9 separate sprites are created! In the Sprite Editor, click the small arrow to the right of Sprite Editor. In the Inspector, click the Sprite Editor button. Change Sprite Mode to Multiple and change Pixels Per Unit to 256 (tiles are 256 pixels wide). To use these, click on FloorBricksToGrassCorner.png. I usually place this window next to the Hierarchy for convenience.ĭrag and drop FloorBricksToGrassCorner.png into Assets -> Tiles. To do this, select Window -> 2D -> Tile Palette. Once you've created your Tile Palette, you need to open the Tile Palette window. ![]() To create a Tile Palette, right-click in the Assets window and select Create -> 2D -> Tile Palette -> Rectangular To create a Tilemap, right-click in the Hierarchy window and select 2D Object -> Tilemap -> RectangularĬreate a new folder in the Assets window and call it Tiles. By using Tilemaps, making a level is like painting!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |