From the course: Unity 4: 2D Essential Training

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Creating a player prefab

Creating a player prefab - Unity Tutorial

From the course: Unity 4: 2D Essential Training

Start my 1-month free trial

Creating a player prefab

So, at this point, we've created a basic animation for our player and we've also created an idle animation that we'll later be able to link the two together. Next, we'll add some additional animations and package this player up so that we can reuse them in other scenes. Before we get started, let's just rename this game object to Player. Now, we're going to create the wait animation. The wait animation is what you see when the user doesn't move the player for a certain period of time. In this case it's going to be a little reflection that goes across the player's helmet. We'll select sprite five and using Shift we'll select all the way over to just before the player starts walking. Here you'll see that there are ten frames that we've selected. Simply drag these into the scene, and we're going to call this Player Wait Animation. If you go back into our Assets folder and select the Animations folder and hit Save, our Animation will now be saved to that folder. We can test this out by…

Contents