Let's make the player animation by now.
Uh, but before we do, let's create animation folder so we can drag all of the animation into that
folder to keep our project clean.
So let's head over to this project tab then asset.
Let's right click on this Assets Create and then folder in the top.
And I'm going to name this folder to something like animation.
And let's hit in enter to create the folder.
And let's create also a sub folder for our player animation because we're going to have multiple animation
like anime animation, some stuff animation.
So that's why.
So let's double click on this uh to just open that up animation folder.
Or you can just simply right click on this animation folder, then create and then folder.
And we can name this folder to something like uh player animation.
So let's create a player animation sub folder for our player animation.
So let's create a player player underscore animation.
We can simply call it and that's it.
And now we are ready to create the animation.
And before you create the animation, you need animator tab, sorry animation tab, as well as this
animator tab.
So how you can find that?
In order to get it you need to go window in the top.
Then scroll down a bit says general or sorry not general.
Basically, you need to move over to this animation section and you can see animation tab and the shortcut
key.
You can see Control Plus six.
So if you just uh press down Control Plus six, it's gonna bring up the animation tab as a right away
or immediately as well as you're gonna need this animator tab.
So I don't have the animation tab.
So I'm going to just click on this animation tab in order to get it.
And we're going to toggle it down in the bottom somewhere over here.
Uh or I'm gonna move it over here, something like that.
And we are ready to create the animation.
So, uh, before you create, make sure you select the player GameObject in the hierarchy.
And as soon as we have chosen our player game object in hierarchy, we can see in the animation tab
we get a create button.
So just click on that create button in order to create the animation.
And we're going to create the animation.
So firstly we're going to move over to this assets in the top left you can see.
So let's click there.
And we do know we created a animation folder.
And we can see it right over here.
So let's double click on it in order to open that up.
And we also can see that we have clear underscore animation folder basically this folder.
So let's open that up as well by double clicking on it.
And we have to name the animation what we want to name it.
So this will be the player underscore run something like that.
So I'm going to call it player underscore.
Or you can just make it space as well if you don't want to put underscore.
But I'm going to put underscore.
And this will be the run one.
So I'm going to call it run.
So player underscore run I just name it the animation as you can see.
And after doing that click on this save button in the bottom right you can see.
So just click that.
And as soon as we click we can see we need to drag all of the individuals frames right over here or
sprite.
So what you need to do, you need to move over to this project tab, then assets.
And I'm going to move over to this sprite folder.
Basically we have to find the player sprite.
So I'm going to move over to this player sub folder.
And we can see the player sprite over here player sprite sheet.
So let's click there and let's click on this arrow to able to see individual.
So what you have to do you need to select the run sprites individual sprite all of them over to this
animation tab.
But before you do make sure you just click on this red button in animation tab in order to capture the
animation or to record the animation.
So make sure you do that.
And after doing that, or select all of the sprite from that folder.
So I have 123456.
So six frames I can see this is the run frames individual round frame.
So I'm going to select all of them and drag it over to this animation tab.
And we can click on this play button in order to play the animation, but the problem is that animation
is too fast.
So what we need to do, we need to make some spaces between these individual sprite.
So select like this and we're gonna move it over to something like uh, 30 I guess 30 just gonna be
a perfect number.
And we can just click on this play button in order to play our animation so we can we a, uh, so what
we need to do, we need to remove one sprite.
But before we do, let's click on this play button in order to play our animation.
So I guess we need to, uh, remove this one.
So we're gonna select our last frame and we can simply delete, uh, to remove that.
And we can just click on this play button and we can see the animation.
But the animation, uh, kind of look weird.
So I'm going to select the last frame and I'm gonna move it over here.
And we're gonna move manually.
Set this up.
So let's select individual and we're going to move it five.
Then this one should be in ten to just make the animation perfect.
And I'm gonna move this 20.
And then this is going to be 25.
And let's click on this play button to play the animation.
And we can see the animation.
Indeed.
And this is fine by now.
So we can just click on this play button.
And this is okay I guess.
And once you are done make sure you just click on this red button one more time in order to capture
the animation.
And we're gonna have other animation as well.
Something like taking damages, uh, something like that.
We need.
And we also gonna create the jump animation.
So let's create the jump animation of our player game object.
So select the player game object one more time in the hierarchy, then move over to this animation tab
and then click over here in order to create another animation.
So we're going to click on this Create New clip.
And this is going to be the player underscore jump.
Or this is going to be player jump animation clip.
So I'm going to call this one to something like player underscore jump.
And let's click on the save button one more time in order to uh just drag the frames.
So let's click on this red button in order to capture or record our animation, I'm going to choose
a sprite, something like this one.
I'm going to choose a single sprite to make the jump.
So let's select this one and drag it over here, and we can just click on this play button in order
to play.
So we can see we only have one sprite.
So it's just playing over again and again.
And we can just click on this red button in order to capture the animation.
And we have created all of the animation by now.
So I'm going to drag this animation tab in the bottom.
So I'm going to toggle it this animation now in the bottom somewhere over here because we have created
all of the animation by now, and we don't want the jump animation clip to be looped.
So I'm going to unloop that.
So how you can do that?
In order to do, make sure you just move over to this project tab, then assets folder, and you basically
need to move over to that folder in which folder you just place your all of the animation.
So in my case this animation folder.
So let's head over to that animation folder and let's click over here to expand.
And we can see we also have a player underscore.
Animation subfolder.
And we can see we have both of those animation.
So we have this player underscore jump animation clip.
And we can see it over here as well as we have player underscore run animation clip.
So I don't want jump animation clip to below.
So I'm going to select my jump animation clip player underscore jump and then go over to Inspector in
the right.
And then I'm going to uncheck this loop time.
So the animation not gonna be not gonna be looped right away.
And we can just click on this play button.
You will see this player game object.
Just gonna play the run animation clip over again and again, because that one is the default animation
clip.
So that's why it's gonna play.
So as soon as the game started we can see the jump.
Sorry.
The running animation clip just playing over again and again.
So basically that is the thing.
So I'm gonna get out of play mode.
I hope you get the idea that, uh, how you can create your animation and that's it.