WEBVTT

00:00.200 --> 00:01.360
Now what we will do.

00:01.400 --> 00:05.920
We will disable this enemy too, and this white ground for.

00:06.080 --> 00:09.360
And we're just gonna place our tiles to do that.

00:09.360 --> 00:15.640
Let's select this ground and this player by holding down Ctrl or sorry, uh, by let's select this ground

00:15.640 --> 00:19.640
and this enemy too, by holding down Ctrl on your keyboard.

00:19.640 --> 00:22.200
Then go over to Inspector and then uncheck.

00:22.200 --> 00:24.440
Basically you just disabling that.

00:24.440 --> 00:26.560
And now we're going to create our grid.

00:26.560 --> 00:32.360
But before we do what we want to do we basically gonna create a tile map folder.

00:32.360 --> 00:39.040
And into that folder we're going to drag our tiles that we just going to put it in our tile palette.

00:39.080 --> 00:45.920
To do that we need to head over to this project tab then asset right click on it then create folder.

00:45.920 --> 00:49.000
And we're going to call this folder to something like Tile Map.

00:49.120 --> 00:53.320
So we created this folder in order to keep our project clean.

00:53.320 --> 00:55.840
And we will place the tiles over here.

00:55.840 --> 00:56.680
So that's why.

00:56.920 --> 01:01.560
And now what we have to do we basically need to find our tile set?

01:01.560 --> 01:06.560
So for that I will move over to my project tab assets and then sprites folder.

01:06.800 --> 01:11.280
Then I will head over to my environment folder, then tiles folder.

01:11.320 --> 01:13.920
Of course I will have this in the resources.

01:13.920 --> 01:16.040
You can go and check that out.

01:16.160 --> 01:20.920
So we're going to select I'm going to select this both of these tile set sprite sheet.

01:20.920 --> 01:23.680
Then go over to Inspector and Sprite mode to.

01:23.720 --> 01:25.280
We're gonna choose multiple.

01:25.320 --> 01:25.720
Why?

01:25.880 --> 01:27.080
Because we want to.

01:27.280 --> 01:32.080
We just want to slice these tiles individually by 16 by 16.

01:32.080 --> 01:32.880
So that's why.

01:33.080 --> 01:40.320
And also we're going to make this pixel per unit 16 since we just want to slice individually 16 by 16.

01:40.320 --> 01:45.760
So we're going to choose 16 and filter mode to point of filter because this is an pixel R.

01:45.800 --> 01:51.480
Or you can simply say to get rid of blurry, we need to choose this filter mode to point no filter.

01:51.480 --> 01:56.320
And after doing all of these things, click on this apply button in the bottom right.

01:56.320 --> 01:57.930
And now it's done.

01:57.930 --> 02:01.770
And we need to create our grid before we place our tiles.

02:01.810 --> 02:04.170
To do that, move over to your hierarchy.

02:04.170 --> 02:06.250
Right click or hit this plus icon.

02:06.250 --> 02:10.170
Then go over to 2D Object Tile map and then rectangular.

02:10.370 --> 02:13.370
And we can call uh we don't need to name it.

02:13.370 --> 02:16.930
So we have the tile map underneath our grid game object.

02:16.930 --> 02:18.370
I'm going to select my create.

02:18.370 --> 02:23.010
Let's drag it into top of my hierarchy so I can see all the time.

02:23.010 --> 02:29.690
And if we select our tile map and move over to the scene view in the in the top left side I can see

02:29.730 --> 02:31.450
Tile Palette tab tile.

02:31.490 --> 02:34.890
So we can just click over there in order to open that up.

02:35.090 --> 02:41.490
And if you are not able to find your Open Tile Palette tab, you need to find it in the scene view you

02:41.490 --> 02:49.370
can get anywhere something like in the bottom right, bottom left or top right or top, uh, left or

02:49.410 --> 02:51.290
middle center anywhere.

02:51.290 --> 02:52.770
So you need to find that.

02:52.770 --> 02:56.850
And after finding that make sure you just click on this Open Tile palette.

02:56.850 --> 03:03.290
As you can see it says drag Tile Sprite texture sprite assets create a new tile palette.

03:03.290 --> 03:05.650
So firstly we need to create a tile palette.

03:05.890 --> 03:11.650
So to create that let's click on this Create New Tile palette and then click on this Create New Tile

03:11.650 --> 03:12.250
palette.

03:12.250 --> 03:15.690
And we have to name the palette what we want to want to name it.

03:15.690 --> 03:17.890
So I'm going to call it Tile palette.

03:18.050 --> 03:19.130
Something like that.

03:20.170 --> 03:23.450
Uh, I really apologize if I am misspelling this.

03:23.610 --> 03:30.650
I guess it should be tile sorry tile palette okay.

03:30.690 --> 03:31.530
Tile palette.

03:31.650 --> 03:33.810
And let's click on this create button.

03:34.090 --> 03:38.290
And now we need it's going to take us to a folder where we want to place it.

03:38.290 --> 03:40.530
So we will go to top left assets.

03:40.570 --> 03:45.130
And as you can see inside assets we created a folder called Tile Map.

03:45.170 --> 03:47.090
As you can notice in the bottom.

03:47.090 --> 03:48.690
So we're going to choose that folder.

03:48.690 --> 03:52.570
And let's click on this select folder in the bottom right we can see.

03:52.810 --> 03:57.020
And now we are ready to drag the sprite sheet right over here.

03:57.340 --> 04:02.780
Uh, so now what we're going to do, uh, firstly we will choose our, uh, this sprite sheet.

04:02.780 --> 04:05.060
Let's click on this open sprite editor.

04:05.500 --> 04:07.860
Uh, so we need what we need to do.

04:07.900 --> 04:09.780
We need to slice individually.

04:09.780 --> 04:14.540
So make sure you select your sprite sheet which is the tile sprite tile set.

04:14.580 --> 04:15.620
Then click on this.

04:15.620 --> 04:17.540
For now I'm going to get rid of that.

04:17.540 --> 04:19.180
So then go over to Inspector.

04:19.180 --> 04:21.220
Click on Open Sprite Editor.

04:21.220 --> 04:23.500
Then go over to your Sprite Editor tab.

04:23.500 --> 04:27.140
Then click on this slice button in the top left you can see uh.

04:27.180 --> 04:30.940
So just click there and select Automatic to Grid by cell size.

04:31.180 --> 04:32.940
Uh make sure you just do that.

04:32.940 --> 04:36.860
And in the pixel size we're going to choose 16 by 16.

04:36.900 --> 04:38.820
In the X we're going to do 16.

04:38.820 --> 04:41.100
And in the Y we're going to do 16.

04:41.100 --> 04:43.060
And in the bottom we can see slice.

04:43.060 --> 04:48.980
So just click on that slice and then click on this apply button and do the same thing with this uh with

04:48.980 --> 04:51.540
this with this tile set sprite sheet.

04:51.540 --> 04:51.820
--.

04:51.940 --> 04:53.100
So let's click on it.

04:53.100 --> 04:55.020
Let's click on Sprite editor.

04:55.060 --> 04:59.620
Let's select automatic to create pixel size slice and then apply.

04:59.860 --> 05:00.940
And now it's done.

05:00.940 --> 05:04.580
And now what we can do I'm going to select my game view once again.

05:04.820 --> 05:06.380
And let's go over to hierarchy.

05:06.420 --> 05:07.780
Then Create Game Object.

05:07.780 --> 05:09.380
And let's select this tile map.

05:09.420 --> 05:15.980
As soon as we select we get a pop up or the tap in our scene view Assess Open Tile palette.

05:15.980 --> 05:20.620
So let's click on it and we are ready to drag the sprites right over here.

05:20.620 --> 05:22.100
Individual styles.

05:22.260 --> 05:23.980
But instead of dragging that.

05:23.980 --> 05:31.380
So if I move over to my tiles folder and then click on this arrow inside the basically into this tile

05:31.940 --> 05:35.620
tile, set sprite sheet and then click on this arrow.

05:35.660 --> 05:37.300
We can see the individual.

05:37.300 --> 05:43.180
So instead of selecting individual we just want to select the whole sprite and then drag it over to

05:43.220 --> 05:46.940
this tile palette tile palette in your Tile Palette tab.

05:47.260 --> 05:51.830
And it's going to take us, take us to a folder where we want to place it.

05:51.830 --> 05:56.990
So we will go to assets in the top we can see or you can see in the top left side.

05:57.190 --> 06:01.670
Then we're going to choose our tile map folder and let's click on this select folder.

06:01.830 --> 06:08.470
As soon as we're going to select Folder Tile just going to be over here in our tile palette as you can

06:08.470 --> 06:09.470
notice indeed.

06:09.590 --> 06:12.430
And let's do the same thing with this tile sets.

06:12.430 --> 06:16.150
So let's select that and drag it over to this in view sorry.

06:16.190 --> 06:18.470
Drag it over to this Tile Palette tab.

06:18.830 --> 06:21.070
And now it's going to take us folder.

06:21.070 --> 06:25.230
So let's go to Assets Tile Map and let's click on this select folder.

06:27.910 --> 06:29.470
I really apologize for this.

06:30.230 --> 06:32.310
And now this seems pretty much cool.

06:32.310 --> 06:34.830
And we are ready to place our tiles.

06:35.030 --> 06:39.470
And in order to place your tiles in the top bar you can see many tool.

06:39.470 --> 06:41.150
So we have the brush tool.

06:41.190 --> 06:45.350
And to paste our tile and the shortcut key we can notice is B.

06:45.390 --> 06:46.790
So we can select this tile.

06:46.790 --> 06:52.190
And we can just paste it in the scene view right away, and we can select this tile like this.

06:52.190 --> 06:53.630
And we can just paste it.

06:53.630 --> 06:55.990
And let's suppose you just place the wrong tile.

06:56.030 --> 06:59.990
Let's suppose I just place, uh, this this should be the end.

06:59.990 --> 07:03.910
So what we need to do, we need to select this tile which is top left.

07:03.910 --> 07:06.950
We can see in our tile palette tile palette.

07:06.950 --> 07:08.350
We just want to place it.

07:08.350 --> 07:09.630
So we're going to do that.

07:09.630 --> 07:15.870
And if we just place it over here as you can notice it's uh mistakenly we have done.

07:16.110 --> 07:18.870
And let's suppose you just want to erase that.

07:18.870 --> 07:22.750
To do that, you need to select this eraser tool in the top bar.

07:22.790 --> 07:25.030
You can see in your Tile palette tab.

07:25.030 --> 07:26.750
And the shortcut key is T.

07:26.790 --> 07:32.590
So if you simply press down T on your keyboard, it's gonna take you to that, uh, tool.

07:32.910 --> 07:40.350
And we can just erase that tool or, or we can simply erase this whole by selecting like, this in our

07:40.350 --> 07:44.710
tile palette and then choosing this brush, sorry, erase tool.

07:44.710 --> 07:49.160
And we can just erase at one time this whole thing, as you can see.

07:49.480 --> 07:55.880
And if you've done any mistake, then you can just press down Ctrl Z on your keyboard in order to undo

07:55.920 --> 07:57.680
anything that you want to do.

07:57.680 --> 08:04.960
So I want it back so I can simply press down Ctrl Z on my keyboard in order to get it back, as you

08:04.960 --> 08:05.640
can notice.

08:05.800 --> 08:07.400
And I'm gonna place my tiles.

08:07.400 --> 08:10.960
So let's choose this brush tool and let's select this.

08:10.960 --> 08:13.880
Or we can simply select this whole thing like this.

08:13.880 --> 08:18.520
And we can just paste it in this in view directly like this.

08:18.520 --> 08:20.080
So I hope you get the idea.

08:20.240 --> 08:28.080
And I'm gonna, uh, I'm gonna do with this one and let's do it here and let's paste it.

08:28.080 --> 08:31.080
And this seems pretty much cool as you can notice.

08:31.360 --> 08:33.520
So this is way much cool.

08:33.920 --> 08:39.760
And we can just place and for in the top right corner we're going to do this.

08:40.000 --> 08:41.440
And let's select this.

08:41.840 --> 08:48.000
Let's paste it over here then this this, like that, and now this is fine.

08:48.000 --> 08:51.120
And I'm going to cut this tile palette tab for now.

08:51.560 --> 08:57.480
And the problem is that, uh, but before we do, let's call this tile map to something like ground

08:57.480 --> 08:57.960
tiles.

08:57.960 --> 09:05.600
Since this, uh, since we're gonna have multiple tile sets, like, for grasses, uh, back tiles or

09:05.960 --> 09:07.760
all of those things like that.

09:07.760 --> 09:10.080
So that's why we need to specify this.

09:10.120 --> 09:11.960
Uh, this will be our ground tile.

09:11.960 --> 09:14.400
So let's rename that as ground tile.

09:14.440 --> 09:15.320
That tile map.

09:15.320 --> 09:16.880
So let's go over to hierarchy.

09:16.880 --> 09:18.800
Let's go over to Grid Game Object.

09:18.840 --> 09:21.120
Underneath our grid we can see Tile map.

09:21.120 --> 09:25.440
So let's do that and let's rename it to something like ground tiles.

09:25.440 --> 09:30.560
So let's rename this to Ground tiles ground Tiles.

09:30.560 --> 09:34.160
And make sure you just make this grid game object a prefab.

09:34.160 --> 09:35.720
So you will have the copy.

09:35.720 --> 09:40.080
And you don't need to work from scratch or you don't need to start over.

09:40.520 --> 09:45.850
So we're gonna select this grid game object in the hierarchy, and let's drag it over to this prefabs

09:45.850 --> 09:48.450
folder in order to turn it into a prefab.

09:48.970 --> 09:50.810
Uh, into a prefab.

09:51.210 --> 09:51.810
Sorry.

09:52.770 --> 09:57.770
Uh, create I have this one, so I'm going to select this one.

09:57.770 --> 09:59.330
Let's delete that.

10:03.090 --> 10:04.290
And let's go back.

10:04.290 --> 10:05.690
And now this is fine.

10:05.690 --> 10:07.930
So make sure you just make it prefab.

10:07.930 --> 10:09.930
So you're gonna have the copy of it.

10:10.290 --> 10:16.250
And the problem is that if I just go ahead and then click on this play button in the top, you will

10:16.250 --> 10:21.130
notice this player game object just passes through this tile ground tiles.

10:21.130 --> 10:21.650
Why?

10:21.690 --> 10:27.050
Because we haven't added any collider to these tiles or individual tiles.

10:27.050 --> 10:31.210
So that's why our player GameObject not gonna detect any collision.

10:31.210 --> 10:35.090
So that's why it's gonna just pass through this ground tiles.

10:35.090 --> 10:38.530
And you will see as soon as our game just gonna start.

10:39.770 --> 10:43.570
And indeed we can see it just passes through this ground tiles.

10:43.650 --> 10:49.330
So what we need to do, we need to add colliders to this individual tiles or this ground tiles.

10:49.330 --> 10:54.850
So let's get out of play mode and let's select the ground tiles underneath our grid GameObject in the

10:54.850 --> 10:55.410
hierarchy.

10:55.690 --> 10:57.250
Then go over to Inspector.

10:57.290 --> 11:03.890
Then click on this add component in the bottom and you need to add Tile Map Collider so you can simply

11:04.010 --> 11:04.530
type.

11:04.690 --> 11:10.090
Basically, you can find the component by typing name of the component, which is tile map Collider

11:10.290 --> 11:11.770
or what else you can do.

11:11.770 --> 11:13.810
You can click on this add component.

11:14.010 --> 11:15.210
So add component.

11:15.210 --> 11:17.810
Then you need to move over to this physics 2D.

11:18.050 --> 11:21.250
And you need to find the Tile Map Collider over here.

11:21.250 --> 11:22.770
You can find it here.

11:23.130 --> 11:26.530
So we can notice rigidbody.

11:26.570 --> 11:27.890
We have multiples.

11:28.570 --> 11:31.770
But instead of doing that simply search over here.

11:31.970 --> 11:34.530
Uh like this tile map collider.

11:34.530 --> 11:35.930
And it's going to pop up.

11:35.930 --> 11:38.570
And let's click on this tile Map Collider.

11:38.570 --> 11:46.900
And as soon as we just added our Tilemap collider, we can see the collider just added up to our individual

11:46.940 --> 11:47.460
tiles.

11:47.580 --> 11:52.900
And now if I just go ahead and then click on this play button in the top, you will see this player

11:52.940 --> 11:57.980
game object will not able to jump on top of this tile map.

11:57.980 --> 11:59.700
Basically it's just gonna stand.

11:59.860 --> 12:02.180
And for the first time it's gonna jump.

12:02.180 --> 12:05.340
But for the second time, it's not gonna do at all.

12:05.380 --> 12:06.620
Let me show you why.

12:07.060 --> 12:13.060
So if I just jump and as you can notice, we can move left and right and we can jump.

12:13.500 --> 12:21.580
But the problem is that if we jump by now, we can see our player just stuck at jump animation clip.

12:21.700 --> 12:25.980
So if I select my player in the hierarchy, then go over to my animator tab.

12:26.020 --> 12:29.340
As you can notice our player stack at player jump.

12:29.540 --> 12:32.660
Uh player jump animation clip y.

12:32.820 --> 12:41.420
And we also not able to jump anymore because we just jumped on Tilemap Collider, which is not our ground.

12:41.420 --> 12:46.860
So what we need to do, we need to get out of play mode and we need to assign this Tilemap Collider,

12:47.020 --> 12:49.260
this collider as a ground tag.

12:49.260 --> 12:54.980
So this player GameObject will know that this is our ground and it's gonna jump atop.

12:55.140 --> 12:56.100
It's gonna jump.

12:56.100 --> 13:01.900
So we need to assign this ground tiles as a ground attack as well as ground layer.

13:01.900 --> 13:09.220
So this player GameObject will know this is our ground ground tiles or this is our ground simply.

13:09.220 --> 13:11.260
So we're going to choose our ground tiles.

13:11.300 --> 13:12.220
Let's choose that.

13:12.220 --> 13:14.100
Go over to Inspector and Tag.

13:14.140 --> 13:16.420
As you can notice it says untag.

13:16.420 --> 13:18.580
So let's assign with our ground tag.

13:18.580 --> 13:21.300
So now this is our ground and layer.

13:21.300 --> 13:23.420
We're gonna choose our ground layer.

13:23.420 --> 13:24.980
So let's assign with ground.

13:24.980 --> 13:30.220
So now by now this player objects are just gonna know that this is our ground.

13:30.220 --> 13:36.510
And if I go ahead and then click on this play button in the top in order to play our game, you will

13:36.510 --> 13:44.950
notice that this player game object just gonna just gonna jump are able to jump from from top of this

13:44.950 --> 13:49.790
ground tile game game object from from this ground tiles.

13:49.990 --> 13:50.910
So let's have a look.

13:50.910 --> 13:58.390
So if I jump as you can see indeed indeed we can see that we are able to jump for the next time as well.

13:58.750 --> 14:04.190
But let's suppose you just want to merge all of these individual collider at once.

14:04.190 --> 14:07.310
So how you can do for that get out of play mode?

14:07.710 --> 14:10.630
For it you need to add a component.

14:10.630 --> 14:12.910
It's called Composite Collider 2D.

14:12.950 --> 14:15.110
So make sure you select your ground tiles.

14:15.110 --> 14:16.550
Then go over to Inspector.

14:16.550 --> 14:21.070
Click on Add Component and you need to find it over here by Crown it.

14:21.070 --> 14:29.990
To sound common, you need to find composite Composite Collider 2D and then attach that and then go

14:29.990 --> 14:33.830
over to Rigidbody 2D and set the body type to kinematic.

14:34.190 --> 14:40.790
and collision detection to continuous, and you can choose interpolate to interpolate to making a little

14:40.870 --> 14:41.590
bit smooth.

14:41.710 --> 14:47.550
And after doing that, what you need to do, you need to move over to this Tilemap Collider and then

14:47.590 --> 14:49.830
over here composite operation.

14:49.830 --> 14:51.950
As you can notice it says none.

14:51.950 --> 14:55.310
So you need to click on it and then click on this match.

14:55.310 --> 15:03.070
And as soon as we click on it merge, we can see individual colliders just compiles at once, as you

15:03.070 --> 15:03.790
can notice.

15:04.030 --> 15:06.750
And make sure you just go to your parent game object.

15:06.750 --> 15:11.550
Select the parent, then go over to Inspector, then overrides and then apply all.

15:11.550 --> 15:15.830
So the changes you made inside this grid game object it's going to be saved.

15:15.830 --> 15:21.550
So let's suppose you want to move this ground tiles at somewhere something like over here.

15:21.550 --> 15:23.510
So how you can do that for it.

15:23.510 --> 15:29.110
Go over to hierarchy, then create then ground tiles and then click on this open tile in this scene

15:29.110 --> 15:29.510
view.

15:29.790 --> 15:31.470
And you can select this tool.

15:31.470 --> 15:35.120
And the tool is called a area of the grid.

15:35.120 --> 15:37.240
And the shortcut key is ace.

15:37.240 --> 15:43.320
So we can select that and we can select the tiles or which tile we just want to move.

15:43.360 --> 15:50.440
Since I want to move this all up is somewhere over here, then we can just select this and we can click

15:50.440 --> 15:52.800
on this this tool next to it.

15:53.000 --> 15:55.720
And it's called a selection tool.

15:55.720 --> 15:58.280
And the shortcut key we can notice is M.

15:58.280 --> 15:59.520
So we can select that.

15:59.520 --> 16:01.920
And now we can select our round tiles.

16:01.920 --> 16:04.440
And we can just move it anywhere we like.

16:04.480 --> 16:07.360
As you can notice in this end view like that.

16:07.560 --> 16:11.240
And let's suppose you just want to make a copy of this round.

16:11.280 --> 16:13.200
Then you can just select this tool.

16:13.560 --> 16:16.520
And this tool called is Pick or mask tool.

16:16.520 --> 16:19.040
And the shortcut key we can notice is I.

16:19.320 --> 16:21.840
And we can just select this round tiles.

16:22.160 --> 16:25.360
And we can just make a copy as you can notice.

16:25.360 --> 16:30.880
And we can just paste it in in our scene view anywhere we want something like that.

16:31.160 --> 16:37.560
As you can notice, and if you want to erase this, uh, this ground tiles totally, then you can just

16:37.560 --> 16:41.080
select like this in your tile palette like this bigger.

16:41.240 --> 16:43.920
And then choose this eraser tool in the top bar.

16:43.920 --> 16:46.360
You can see in your tile palette tool.

16:46.480 --> 16:48.960
And then you can just erase at one time.

16:48.960 --> 16:55.520
As you can see, as soon as we just click, uh, that whole tile just get disappear or we just erase

16:55.520 --> 16:57.800
and let's suppose you just want it back.

16:58.120 --> 17:05.040
Uh, then you can simply press down Ctrl Z on your keyboard in order to undo, as you can show, as

17:05.080 --> 17:05.480
sorry.

17:05.640 --> 17:10.320
As you can see, as soon as we have done it, we can see we just get it back.

17:10.360 --> 17:15.360
Our, uh, this ground tile, and I want to have it a back tile.

17:15.480 --> 17:18.640
So for that we need to create a new tiles.

17:18.640 --> 17:21.760
To do that, firstly you need to move over to hierarchy.

17:21.800 --> 17:25.160
Then go over to this create Game object in your hierarchy tab.

17:25.400 --> 17:27.600
Then right click on this Create Game object.

17:27.640 --> 17:33.610
Then go over to 2D object, then tile map, and then click on this rectangular and you can call this

17:33.650 --> 17:35.490
one something like tiles.

17:35.490 --> 17:40.850
So since this is going to be a tile so I'm going to call it something like back tiles.

17:40.850 --> 17:47.090
And if you have grass then you can just call it something like grass tiles something like that.

17:47.090 --> 17:52.290
So what I'm going to do I'm going to name this to something like uh back tiles.

17:52.330 --> 17:57.810
So, so let's call it uh, back tiles, sorry, back tiles.

17:58.010 --> 18:03.130
And what we're going to do now, we're going to choose our back tiles, then go over to Scene View and

18:03.130 --> 18:05.570
then click on this open tile palette.

18:05.570 --> 18:12.730
And now we're going to choose this, uh, dark dark dark dark tiles like this.

18:12.770 --> 18:18.450
It should be behind or basically these tiles and it should be behind our ground tiles.

18:18.770 --> 18:23.610
Uh, so uh, so I'm going to paste it somewhere over here, as you can see.

18:23.770 --> 18:29.490
But the problem is that it seems in front of our ground tiles and we want it back.

18:29.490 --> 18:31.010
So what we need to do for it.

18:31.050 --> 18:36.250
We need to assign some sorting layer for this ground tiles as well as back tiles for that.

18:36.490 --> 18:40.170
I'm gonna cut this tap Tile palette tab for now.

18:40.410 --> 18:43.930
And let's select this tiles or this ground tiles.

18:43.930 --> 18:50.530
Then go over to Inspector, then Tilemap tile map renderer, then additional setting sorting layer.

18:50.650 --> 18:56.490
Click on it and then click on Add Sorting Layer and create two sorting layer by clicking on this plus

18:56.490 --> 18:57.050
icon.

18:57.050 --> 19:03.410
And you can name the name it something like Ground Tiles and you need to create one for your back tiles.

19:03.410 --> 19:05.570
As you can notice, I already created.

19:05.570 --> 19:11.930
So I'm gonna click on this minus and I just drag it this ground tile in front of this tiles.

19:11.930 --> 19:19.530
And if I just drag this back tiles in front of this ground tiles, then this tile is just gonna be in

19:19.530 --> 19:21.370
front of our ground tiles.

19:21.410 --> 19:25.260
Since I want this back tiles to be behind of my ground tiles.

19:25.300 --> 19:27.660
So that's why I'm going to choose my back tiles.

19:27.660 --> 19:30.380
And I'm going to drag it behind my ground tiles.

19:30.380 --> 19:35.020
And we need to assign our back tiles with these back tiles sorting layer.

19:35.020 --> 19:38.980
And we need to assign this ground tiles as a ground tile sorting layer.

19:39.020 --> 19:43.900
To do that let's go over to hierarchy, then create and then let's choose this ground tiles.

19:43.940 --> 19:51.780
Let's go over to Inspector, then tile map renderer, additional sorting settings then sorting layer.

19:51.780 --> 19:54.100
And we're going to choose our ground tiles.

19:54.220 --> 19:56.060
And for this tiles.

19:56.060 --> 19:58.100
So let's choose our back tiles.

19:58.140 --> 20:01.940
Then go over to Inspector Tile Map Renderer and Sorting Layer.

20:01.940 --> 20:04.580
We're gonna choose for this tiles.

20:04.580 --> 20:12.100
And as soon as we have clicked clicked on it we can see by now our tiles is behind of our ground tiles

20:12.100 --> 20:13.340
as you can notice.

20:13.540 --> 20:16.460
So I hope you get the idea that how you can do it.

20:16.460 --> 20:20.940
And we have many tools in our Open Tile Palette tab.

20:20.940 --> 20:29.660
We can see we can flip our tiles, we can just rotate our tiles as well as we can just flip our tiles

20:29.660 --> 20:30.620
vertically.

20:30.620 --> 20:36.900
So I hope you get the idea that how you can do it, and you can just get it and make sure you always

20:36.940 --> 20:38.340
go to parent game object.

20:38.340 --> 20:43.380
If you turn it your game object into a prefab, then make sure you select the parent one.

20:43.380 --> 20:47.220
Then go over to Inspector Overrides and then apply all.

20:47.220 --> 20:50.260
So the changes we made, it's just gonna save.

20:50.300 --> 20:57.300
And I'm not gonna I'm not gonna attach any colliders to this back tiles since we don't want to collide,

20:57.300 --> 20:59.860
and it should be behind of our player.

21:00.060 --> 21:04.620
And if we go ahead and then click on this play button, it's gonna work fine.

21:04.620 --> 21:09.180
And we only added the tile map collider to this ground tiles.

21:09.180 --> 21:10.660
Not with this tiles.

21:10.820 --> 21:16.260
And if you have a grass, then you can create a new tile map for your grass.

21:16.420 --> 21:18.980
And you can just do it as I have done.

21:18.980 --> 21:24.910
You can just follow the same process, So I hope you get the idea that how you can do it and you can

21:24.910 --> 21:31.390
just go ahead and you can do that, and if you a little bit confused, then don't worry, I'm gonna

21:31.390 --> 21:33.390
have a video in the resources.

21:33.390 --> 21:39.030
You can go and check that out if you just want to learn more about tiles.

21:39.190 --> 21:45.510
And if I play around, as you can notice, this seems pretty much fine and we can jump and we need to

21:45.510 --> 21:49.510
make our jump a little bit small instead of making too much high.

21:49.750 --> 21:53.110
And we can notice we can attack the.

21:53.110 --> 21:56.430
And this seems pretty much cool as you can notice.

21:56.430 --> 21:58.030
So I hope you get the idea.

21:58.230 --> 22:05.950
And if you have something like four objects, then you can create a new tile map for your objects and

22:05.950 --> 22:11.150
you need to assign with sorting layer some sorting layer so you can have it perfectly.

22:11.150 --> 22:17.390
So I'm gonna get out of play mode, and I will press down Ctrl s on my keyboard in order to save my

22:17.390 --> 22:18.110
project.

22:18.110 --> 22:20.630
So I hope you get the idea that how you can do it.
