Unity 5 2D Animation Tutorial

A game without animations would be really dull thing to play and probably wouldn’t be popular, who would want to watch sprites flying all over the screen?
Lets learn (in 5 minutes) how to make animation in Unity 5, so you don’t need to watch those 1 hour tutorials which are pure torture 😉

First you need sprites, lots of sprites in one image so i made this animation with gimp, you can probably look for something better but lets use this for now.

(right click -> save…)

spaceman

 

Start by opening Unity, choose 2D and hit Create project.

Screenshot_4

Now you need to import our png image. Select Assets -> Import New Asset. And choose the png image.

Screenshot_5

Now you need to select our image in Assets and then you should see Inspector. In inspector select Sprite Mode -> Multiple and Apply. Now hit the Sprite Editor.

Screenshot_6

In Sprite Editor select Slice and Slice once again. That should make boxes around our images. And then press Apply and you can close Sprite Editor.

Screenshot_7

Now  you need to press small arrow in Assets where our cropped sprites are. Arrow opens up bigger preview of them and then select them all (ctrl + mouse left) and drag them into Scene, it should automatically ask you to save it.

screenshot_8

Now go to Window -> Animation.

Screenshot_10

Just select our spaceman in Scene and then press Create button in Animation window.

Screenshot_11

Now you should have your animation ready, if you press play button in Animation window you should see our spaceman walking super fast. If you double click one of the blue cubes you can adjust the timing or change Samples to 30 to make it walk slower.

Screenshot_12

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s