1
00:00:00,000 --> 00:00:00,000
Hello, guys.

2
00:00:00,000 --> 00:00:06,000
In this video, I want to talk about sprites and how to prepare them, because now you have assets that

3
00:00:06,000 --> 00:00:08,000
I prepared for you.

4
00:00:08,000 --> 00:00:14,000
But still, I want to let you know how to do that on your own in case you have your own sprites in your

5
00:00:14,000 --> 00:00:14,000
own project.

6
00:00:14,000 --> 00:00:15,000
All right.

7
00:00:16,000 --> 00:00:22,000
So in the moment, you can see that my sprites are all set, and if you drag them to the project, they

8
00:00:22,000 --> 00:00:24,000
are like this.

9
00:00:24,000 --> 00:00:32,000
But if you take any of those sprites, let's say I'll take idle number two and I'll click reset over

10
00:00:32,000 --> 00:00:33,000
here.

11
00:00:33,000 --> 00:00:39,000
Then there's going to be default settings, How it would behave if you just transferred to a project

12
00:00:39,000 --> 00:00:44,000
from somewhere and if you drag it here, it is very small, right?

13
00:00:44,000 --> 00:00:46,000
First we need to make it bigger on that.

14
00:00:46,000 --> 00:00:52,000
We're going to change pixel per unit, so let's change that because the lower it is, the bigger sprite

15
00:00:52,000 --> 00:00:56,000
will be and it's going to be 16 here just like that.

16
00:00:56,000 --> 00:01:03,000
Now we have the sprite, but it is not sharp, it is not crispy like the one we have over here.

17
00:01:03,000 --> 00:01:05,000
You can see the difference between them, right?

18
00:01:05,000 --> 00:01:13,000
So what to do here is we need to change filter mode to point no filter and compression should be none

19
00:01:14,000 --> 00:01:14,000
hit.

20
00:01:14,000 --> 00:01:15,000
Apply.

21
00:01:15,000 --> 00:01:17,000
And now it is how it should be.

22
00:01:17,000 --> 00:01:18,000
Perfect.

23
00:01:18,000 --> 00:01:20,000
Something else to mention here.

24
00:01:22,000 --> 00:01:28,000
Look, I have my objects, and my center point of this object is above his head.

25
00:01:29,000 --> 00:01:33,000
If you select the platform, you can see it is in the middle, right?

26
00:01:33,000 --> 00:01:36,000
And for the player, it is in the middle.

27
00:01:36,000 --> 00:01:38,000
But for this one, it is above his head.

28
00:01:38,000 --> 00:01:39,000
Why is that?

29
00:01:39,000 --> 00:01:41,000
First, we need to make sure.

30
00:01:41,000 --> 00:01:42,000
Over here in the corner.

31
00:01:43,000 --> 00:01:51,000
Center changed to pivot because this using center of the object, this using pivot point, if it has

32
00:01:51,000 --> 00:01:52,000
one.

33
00:01:52,000 --> 00:01:54,000
So let's say this is center point.

34
00:01:54,000 --> 00:01:57,000
And now if I select the player, I can see it is above as well.

35
00:01:57,000 --> 00:02:02,000
This happens because of the how sprite was drawn at first.

36
00:02:02,000 --> 00:02:05,000
Look at this one if I go to Sprite editor.

37
00:02:06,000 --> 00:02:10,000
I can see that my center is over here.

38
00:02:10,000 --> 00:02:13,000
And all of that above is just empty space.

39
00:02:13,000 --> 00:02:16,000
But still it's part of the picture.

40
00:02:16,000 --> 00:02:18,000
So that's why my center is here.

41
00:02:18,000 --> 00:02:24,000
What we can do to fix it, to make it normal because it's a good, healthy practice to have your pivot

42
00:02:24,000 --> 00:02:26,000
point and the center of the object.

43
00:02:26,000 --> 00:02:29,000
When you change position in unity, it is very important.

44
00:02:29,000 --> 00:02:36,000
So first, what you can do is go over here and select pivot, and then you need to make sure your pivot

45
00:02:36,000 --> 00:02:38,000
point is in the center.

46
00:02:38,000 --> 00:02:40,000
In this case, we need to do it manually.

47
00:02:41,000 --> 00:02:42,000
In some other projects.

48
00:02:42,000 --> 00:02:44,000
It is already in the center.

49
00:02:44,000 --> 00:02:50,000
It all depends on the sprites and assets and who made them at first place.

50
00:02:50,000 --> 00:02:56,000
Like if we check sprites in my in other project from another course on how to make platformer, we can

51
00:02:56,000 --> 00:02:59,000
see that Sprite is in the center.

52
00:02:59,000 --> 00:03:04,000
And even if I reset the settings, give me a second.

53
00:03:06,000 --> 00:03:08,000
I'll take this idle and reset.

54
00:03:10,000 --> 00:03:14,000
Yeah, we can see it is in the center.

55
00:03:14,000 --> 00:03:17,000
If I change it to, I'll do it quickly.

56
00:03:17,000 --> 00:03:18,000
Multiple and 16.

57
00:03:20,000 --> 00:03:24,000
Sprite ed I play and I slice it green by cell size.

58
00:03:24,000 --> 00:03:24,000
What is that?

59
00:03:24,000 --> 00:03:25,000
I don't remember.

60
00:03:26,000 --> 00:03:26,000
Two.

61
00:03:27,000 --> 00:03:29,000
I started to slice.

62
00:03:30,000 --> 00:03:37,000
Yeah, if I slice them 32 by 32, we can see that each of them has a pivot point in the center and this

63
00:03:37,000 --> 00:03:38,000
is what it should be.

64
00:03:38,000 --> 00:03:40,000
This is the healthy practice, I would say.

65
00:03:40,000 --> 00:03:40,000
Right.

66
00:03:40,000 --> 00:03:43,000
So back here, we need to make it at the center.

67
00:03:43,000 --> 00:03:51,000
How we can do that First, we can just change pivot point to something like Bottom Center, but it makes

68
00:03:51,000 --> 00:03:52,000
it at the very bottom.

69
00:03:52,000 --> 00:03:55,000
So we need kind of a custom pivot point, right?

70
00:03:55,000 --> 00:03:59,000
So for that, we can go over here and change custom.

71
00:03:59,000 --> 00:04:06,000
Now this can be dragged sorry, these can be dropped to change pivot point, and it should be somewhere

72
00:04:06,000 --> 00:04:07,000
in the center.

73
00:04:07,000 --> 00:04:11,000
It's not so easy to find one with each spread.

74
00:04:11,000 --> 00:04:12,000
It's different.

75
00:04:12,000 --> 00:04:14,000
So probably you'll have to spend some time on it.

76
00:04:14,000 --> 00:04:17,000
But I know the number because I did it before.

77
00:04:17,000 --> 00:04:24,000
So it's point five on the x and .53 500.

78
00:04:24,000 --> 00:04:25,000
Why?

79
00:04:26,000 --> 00:04:26,000
I guess.

80
00:04:29,000 --> 00:04:30,000
Nah.

81
00:04:30,000 --> 00:04:31,000
No, wait.

82
00:04:36,000 --> 00:04:37,000
Oh, sorry.

83
00:04:37,000 --> 00:04:38,000
2.5.

84
00:04:38,000 --> 00:04:39,000
Yeah, My bad.

85
00:04:40,000 --> 00:04:40,000
It's.

86
00:04:42,000 --> 00:04:48,000
2253, five on the Y, and then it will be fine.

87
00:04:48,000 --> 00:04:49,000
It will be in the middle.

88
00:04:50,000 --> 00:04:58,000
Now you know how to set pivot point and how to make your sprites crispy and fix the size of this price.

89
00:04:58,000 --> 00:05:00,000
Something else here is important.

90
00:05:00,000 --> 00:05:01,000
How to slice them.

91
00:05:01,000 --> 00:05:05,000
As you can see, these sprites even in the same animation idle.

92
00:05:05,000 --> 00:05:10,000
They are all set as a different file, so I don't need to cut them.

93
00:05:10,000 --> 00:05:16,000
But as you just seen in my another project, and I'll use this one just to explain the point.

94
00:05:16,000 --> 00:05:16,000
All right.

95
00:05:16,000 --> 00:05:19,000
They are all together like that.

96
00:05:20,000 --> 00:05:25,000
So for that, you should to go to Sprite mode over here and make sure it's multiple.

97
00:05:25,000 --> 00:05:28,000
Well, let me reset it so you make sure it's multiple.

98
00:05:28,000 --> 00:05:33,000
And then you go to Sprite editor, you hit apply and you have it here.

99
00:05:33,000 --> 00:05:38,000
Now we need to slice it and it can have different way of slicing.

100
00:05:38,000 --> 00:05:44,000
The best one is grid by cell size because it has proper size, but we don't know what kind of spreadsheet

101
00:05:44,000 --> 00:05:46,000
you might have can be such a mess.

102
00:05:46,000 --> 00:05:47,000
You need to do it manually.

103
00:05:47,000 --> 00:05:47,000
All right.

104
00:05:47,000 --> 00:05:50,000
So I choose 32 by 32.

105
00:05:51,000 --> 00:05:58,000
And slice hit the play and have it here sliced all the way we need.

106
00:05:58,000 --> 00:06:00,000
I'll change this back so later.

107
00:06:00,000 --> 00:06:01,000
I won't forget to play.

108
00:06:01,000 --> 00:06:04,000
And I don't need this project anymore.

109
00:06:05,000 --> 00:06:05,000
Done.

110
00:06:05,000 --> 00:06:05,000
Save.

111
00:06:05,000 --> 00:06:11,000
So now you know how to set up sprites, how to cut them, how to prepare them, and if there will be

112
00:06:11,000 --> 00:06:17,000
something else important regarding sprites or in general, be sure I'll let you know in the future videos

113
00:06:17,000 --> 00:06:20,000
because this is my second time recording this course.

114
00:06:20,000 --> 00:06:22,000
I'm doing update, as you might know.

115
00:06:22,000 --> 00:06:24,000
So it's all set.

116
00:06:24,000 --> 00:06:24,000
No worries.

117
00:06:25,000 --> 00:06:26,000
See you later.

