Shaping the Sprites

To add variety to a 2D game environment, you can create multiple different environment assets, like bridges and weirdly shaped platforms. It takes time to draw every single asset, but Unity has developed a tool to manipulate basic sprites into different forms. This tool is called Sprite Shape.

For this lesson, make sure you have Unity 2020.2.2f1 or newer. You can use a tileset of your own choosing, but this lesson includes the same tileset as used in the demonstration video.

The tiles that should be rotated so their outsides are pointing upwards. The tiles are already rotated in the provided zip file.

As per usual, open a new Unity project. Import the needed assets, in this case, the tileset. This time the rotation of the tile must be different than usual; on the image on the left the tiles that need to be rotated are marked. One tile is 64x64 pixels, so if you are using different size tiles, remember to set the Pixels Per Unit to that.

Download a Tileset

Open Shape and Closed Shape

Tähän tulee video, joka on noudettava Risestä.

As an option, you can also use one tilemap with all the tiles, but you have to slice them and rotate the three tiles in Unity. When using 64x64 pixel tiles, change Pixels Per Unit to 64 and then Mesh Type to Full Rect. From the advantage change Wrap Model to Repeat and Filter Mode to Point (no filter). Repeat the same for every tile you are using.

More on Closed Shape

Tähän tulee video, joka on noudettava Risestä.

You might run into a similar problem as in the video in which the corners won’t appear no matter how the tangent modes are changed. This might be caused by an extra point that has been added by an accidental click. To get rid of it, simply click it and press delete.

Sprite Shape enables making more organic-looking game environments and adds more variety to the entire level design. You should try out different settings to see how they change the outcome.