Menu

Unity2D – Overview

Since our post on 2D game prototyping in Unity3D, Unity Technologies has been adding a number of 2D features to their engine, so here’s an update on the key features.

Sprites

Images now have a texture type called sprite. Using this texture type enables you to set the pixels to units ratio and a sprite mode – Single or Multiple.
The Single sprite mode is used when the image contains just one sprite, and Multiple is used when the image is a sprite sheet containing multiple sprites (i.e. for animation purposes).

Sprite Texture Type

When you have a sprite sheet, you can open the sprite editor and slice the sprite sheet into separate sprites:

Sprite Editor

Sprite Animations

You can use these sprites and sprite sheets to create sprite animations. These are simple to make by dragging and dropping a sequence of sprites into the animation window.

Sprite animations

2D Physics

Unity now has 2D physics components. Apart from a standard rectangle and circle collider, it also has a polygon collider which lets you create any shape you want.

Polygon Collider

Note that the 2D physics system completely ignores the z position of any object. The z position is only used for the render order. This means that using the 2D physics for a 2D game where you also can walk up and down (e.g. Final Fight, Streets of Rage) would be complicated. Luckily you can still use the 3D physics in combination with any of the other new 2D features.

Other features

Unity has promised and added some other features for 2D game development. One of these features is the Sprite Packer, only available to Unity Pro users. This system allows creating a sprite sheet from individual sprites images. This sprite packer system is already implemented but is still a Developer Preview and not fully functional.

To conclude, the new 2D features of Unity are a big step forward in using Unity3D for 2D game prototyping but some are still in an infancy state.

Leave a comment

Your email address will not be published. Required fields are marked *