We're going to add a box Collider 2D, and we're going to set it to trigger something like this much.
We're going to create Y.
We're going to create, uh, because, uh, if we just collide with this box Collider 2D, then we're
going to spawn the next one.
So that's why we're going to create in order to set up the logic.
So let's select our ground underscore one GameObject.
So make basically make sure you just select the parent GameObject.
Uh select that and then go over to Inspector.
Then click on this add component.
And we're going to add a component box Collider 2D.
So let's find Box Collider 2D.
And let's attach that by hitting enter.
As you can see now we attach.
So we're going to adjust this collider 2D as the size of our ground.
And we're going to make it something like this.
So let's go to Box Collider 2D and then click on this Edit Collider.
And we're going to edit the Collider something like this.
And now sorry we're going to move this one.
I don't know.
We need to move it over here.
Let's move it down a little bit.
We just want to fit our area.
So that's why something like this much.
And in the why we're going to trigger it.
Some thing like this and this is okay.
And we're going to move this one here.
I don't know why we not able to move this.
So we can just set this up so you can move over to this box Collider 2D then offset.
You can just play around with this and you're going to get it.
And we can see this is fine now.
And from the bottom we're going to move it something like this much.
So let's select the bottom and we're going to move it something like this.
Or you we can just leave it like this as well and make sure you just take this trigger box or else our
player game object just gonna, uh, register or this player game object not gonna able to enter this
box Collider 2D.
So make sure you just go to Box Collider 2D component and then it's trigger and check it.
So this player game object easily can pass through this box.
Collider 2D or easily can enter this box Collider 2D.
So when this player game object just collide with this ground or collide with this box Collider 2D,
as you can see, we attach, then we're gonna spawn the next one from this position.
So we also created a next position.
If you haven't then select the ground underscore one basically the parent.
So select that right click on it and then create an empty game object.
And then move that game object something over here.
And if you just want to choose an icon, then select the game object.
Then go over to Inspector.
Click over here in order to choose an icon and name it to something like Next Position.
As you can see, I just name it to next position.
So firstly create an empty game object and then move it somewhere around here or the gap that you just
want to have to spawn the next ground.
So you can just play around.
You can move this point or this game object or this position further away from this ground.
So uh, the next ground just gonna spawn that, spawn that from that position.
So that's why I just created, as you can see.
So this is the cool thing, uh, because I just want to spawn the next round from this position, so
just, uh, so that is the reason I just move it over here and also name it to something like Next position,
as I did over here to just distinguish distinguish easily.
And that's it.
Uh, so, uh, so why we attach this box collider 2D to this ground, underscore one game object, because
we want to check if this player game object just trigger with this box Collider 2D.
Then we're going to spawn the next round from this position or from somewhere over here.
So that's why we just set it up.
The logic also what we want to do, we just want to assign this ground underscore one game object with
something else tag.
So we're gonna tag this ground underscore one game object something like like like that box we can say.
So let's make sure you select the parent game object first in the hierarchy.
Then go over to Inspector, then tag.
It says un tag as you can see.
So just click there and then click on this add tag.
And we're going to add a tag.
So click on this plus icon in the inspector.
And we have to name the tag what we want.
So we're going to call it something like box box.
Uh something like that.
We're going to call and let's click on that save and make sure you select the parent game object one
more time.
So in my case this crown underscore one game object in the hierarchy.
So select that game object in the hierarchy the parent game object.
Then move over to Inspector one more time and tag.
As you can see it says untagged.
So click there and we're going to assign it to box.
What I just recently named it as you can see.
So I assign it this crown underscore one game object as a box tag.
You can see in Inspector.
So why I just assign it this crown underscore one object as a box tag because I just want to distinct
distinguish.
Basically if this player game object collide with this box tag or this Collider 2D, as we attach this
box, Collider 2D, as you can see, then we're going to spawn the next one.
So that's why I just assigned this box Collider 2D or this one or this crown the parent game object
as a box tag, as you can see in the inspector, you can just assign it with any tag that you would
like to go with.
It's basically totally up to you.
And this is awesome things.
And make sure you just go to Inspector then overrides.
Select the parent game object first in the hierarchy, then go to Inspector overrides, click overrides
and then apply all.
So the changes we made over here, it's gonna save into prefab of this ground underscore one object
as well.
And we can just play our game in order to check out if the player game object is able to just passes
passes through this box, Collider 2D or not.
So let's check it.
So we're going to click on this play button in the top in order to see that.
So just wait for it to compile.
Sorry.
Just wait for it to play our game.
We can see.
So make sure you just go to a box collider and then check this trigger.
So as you can see we are able to enter this box.
Collider 2D.
Why?
Because we just move it over to this box.
So later 2D and we just set its trigger to true.
So that's why.
And we easily can pass it through this box Collider 2D as you can see.
So make sure you just go to Box Collider 2D and check this trigger to check basically means true or
else why this player game object not going to able to enter this box.
Collider 2D.
So let's get out of play mode and let's create the other ground as well.
So what we can simply do we can select our ground, underscore one GameObject or basically the parent
of ground GameObject.
And we can press down in order.
Press Down control D in order to duplicate one.
And we can select the duplicate one.
And we can just move it somewhere around here.
But instead of doing this, we're going to do something else.
And we're going to approach something else something like that.
So what we will do, we will select our duplicate one and let's delete that.
And why we delete it.
Because if we select our crown and the changes we made in this parent game object and then go over to
Inspector Overrides and then click on Apply All.
So the changes we made in this game object, it's going to save into duplicate as well.
And we don't want that.
We're gonna have multiple types of ground some some gonna have green grasses something like that.
So that is the reason we're gonna do we're gonna duplicate that game object from that prefab folder.
Because if we duplicate this in our hierarchy and then change some settings in our the first one, then
move over to this inspector overrides and then click on Apply All.
So the changes we made it's gonna save into duplicate one as well.
And we don't want to uh happen that.
So that's why we're gonna duplicate this ground underscore one game object in our prefab mode.
Basically what we have to do, we need to move over to this project tab, then assets folder.
And then let's move over to this prefabs folder basically where we just made it prefab.
So in our case this prefab folder, as you can see, and we have the ground underscore one game object.
So we're going to open that up by double clicking on it or what.
Simply we can do we can select that ground underscore one game object or that ground.
And we can simply press down Ctrl D in order to duplicate.
So we just duplicating from here uh because we don't want to change or we're going to have multiple
types of ground.
So that's why we just duplicating over here instead of doing in our hierarchy.
So we're going to select our ground prefab game object.
So or the tile map.
As you can see we have it over here.
We're going to select that.
And then we're going to press down Ctrl D in order to duplicate.
And now we're going to select our duplicate one.
And then we're going to name it to something else.
So you can just right click on it.
Then click on this rename in the top.
And we're going to name it something like ground Underscore one.
So we're going to name it ground Underscore sorry, we're not going to name it underscore one.
Basically this one is underscore one.
So the duplicate one we're going to name it something like underscore two.
So let's call it underscore two and hit enter in order to save the name.
And then we're going to select our ground underscore two game object from that folder.
So in our case prefab.
So let's select that and drag it over to the scene view or into hierarchy.
And I'm going to move the this ground underscore two GameObject in our hierarchy.
And I'm going to move it something over here.
Now we can just change around this ground.
And it's going to not going to save into this one or the first one because this is the duplicate one.
And we just duplicate it from that prefab folder.
So whatever changes we're going to make and then move over to this overwrite in the inspector.
Then click on this apply all.
So the change is just going to be saved into this duplicate uh into this one.
And it's not going to change or it's not going to influence any way to the first one.
So that's why we just have done instead of duplicating from in hierarchy, we just duplicate it from
that prefab folder and we're going to select our ground underscore two game object.
And we're going to play or just going to change a little bit.
So let's select our ground underscore two game object.
And let's click over here in order to expand.
And let's move over to this crate and this ground tiles.
Or you can select the simply grids.
And in this interview you're just going to able to see this open tile palette.
And I'm going to move this here.
And let's click on this Open Tile palette in order to open up our tile palette.
And we can just rearrange this ground in order to make a different type of ground tiles.
So I'm going to make it this one green something like that.
And now and I have it over here.
And and you can just move this next position or that you just created an empty something over here.
Uh, so the next, uh, just going to spawn from that position, uh, if you just want to have different
type of grounds, then you can just play around this next position.
So make sure you just drag it from the ground a little bit further away.
So you're gonna have the, uh, gap.
So it's going to be perfect for that.
So basically that is the thing.
So what I'm gonna do, I'm gonna move this next position, something over here.
So let's select our next position underneath our crown underscore two game object.
And I'm going to cut this open tile palette for now.
Or that tile palette tab.
And let's select the move tool from here.
And I'm gonna move this next position something over here.
So the next uh crown just going to spawn from that position from this position.
So you can just play around with that because I just want to expand this round.
So that's why I just move it this next position a little bit further away.
So let's place our tiles.
So let's select the create.
And we're going to click on this open tile palette.
And what I'm going to do I'm going to copy this.
And sorry we need to select this tool which is the mark or pick tool.
And the shortcut key you can see is the right eye.
So I'm going to select this.
And I'm sorry we need to select our round tiles or this tile map underneath our game object a grid game
object first in our hierarchy.
Then we can do so.
Now we're going to select this and we're going to paste it something like this much.
And make sure you just make make it a little bit gap between this next position and the ground.
So we're going to have the gap and it's going to be perfect for that.
So let's drag and I want this to be here.
And I'm gonna erase this.
Styles.
And.
This is awesome.
And I want this one to be here.
I want this, uh, basically green over here.
So I'm going to replace that.
So we're going to select our, uh, print styles from here.
And we can just paste it something like this.
And this is, uh, this seems awesome as you can see.
And we can just paste it here.
Dee dee dee dee dee dee dee dee dee.
I guess this is fine.
Now we're gonna select our grass tile map.
Uh, from that underneath our grid game object, and we're going to paste our, uh, grass.
And we're not going to attach any collider 2D from this grass, basically.
Tilemap Collider.
Uh, and we don't want to do that.
Basically, we're not going to attach any collider to this ground.
So this player game object just gonna easily passes through this grass.
You can simply say, so that's why we just created an another tile map.
Uh, so basically what you have to do, you need to select the grid GameObject first.
Right click on it, then go to 2D object, then Tile Map over here as you can see.
And then choose this rectangular and you can just rename it to something like grasses.
Or you can just name it to something like steps if you just want to have something like a box somewhere
over here or some trees, then you can do and do and make sure you just don't add any collider to that
one, or else your player game object just gonna stack on that.
So that's why and we're going to paste our grasses.
So we're going to select our grass underneath our create GameObject in our hierarchy.
And we're going to paste our grass by now.
So we're going to move uh we're going to paste it here and let's paste it.
This seems awesome.
And we're going to paste this grasses.
And as you can see this one seems pretty nice.
Uh pretty nice as you can see.
So this is cool.
And we can also just play around with this as well.
And now what I'm going to do.
So Make sure you select your ground underscore two game object by now.
And and we just forgot to do that.
Basically we need to adjust this box collider as the size of our ground.
Basically we need to make it a little bit uh or we just need to little bit expand in.
The x axis is as you can see, it's not fitting perfectly.
So we need to do that.
So we're going to select our ground or the parent game object first then move over to Inspector Box
Collider 2D.
And then we're going to edit the Collider something this we're going to move it here in order to fit
it perfectly.
So we're going to move it something like this.
Because once this player game object let's suppose trigger out, then we're going to delete this destroying
what is left behind from this player game object.
We're going to destroy after some period of time.
And once this player game object just enter this box Collider 2D.
Then we're going to spawn the next ground from this position.
So that's why we created an empty game object and we just name it to.
We just named it to Next Position.
So now we're going to select our box this ground underscore two GameObject in our hierarchy.
Let's go to Inspector Overrides and then click on Apply All.
So the changes you're gonna make a it's going to be saved into this ground.
And also underscore two GameObject prefab as well.
So now we're going to create the next ground.
And what we will do.
Uh we're going to delete this one.
Uh for now we're going to select our ground underscore two GameObject.
And I'm going to delete that one.
And uh make sure you just go to that prefab folder and you just made it, uh, make sure you select
the prefab and then control D in order to duplicate.
And don't do it in this in hierarchy because we're going to have multiple types of ground.
So that's why we need to do that.
So we're going to move over to this prefabs folder.
And we're going to select this ground underscore two.
Or you can simply select the first one as well, which is the underscore one.
But I'm going to select my this which is the duplicate one.
Uh or sorry, not duplicate one.
Basically the second graph I'm going to select that.
And we're going to press down Ctrl D in order to duplicate.
And we're going to select our duplicate one.
And let's rename that to something else.
So we're going to select that.
Let's right click on it.
Then click on this rename in the top.
And I'm going to name it to something like round Underscore three.
And we're going to select our underscore three.
Now by now.
Or you can just simply double click on it in order to open it up in prefab mode.
And you can just play like this.
But instead of doing that I'm going to approach a second way to do it.
So in hierarchy you're going to see an arrow icon to go back.
So just click on that in order to move over to this scene view.
As you can see now I'm going to select my underscore three game object from that prefab folder.
And I'm going to drag it in this hierarchy.
And I'm going to move this one from here by selecting this move tool here.
And uh.
And I'm going to remove this crown.
So what I'm going to do.
So let's select the crown.
Underscore three then create and crown tiles.
And I'm going to remove these tiles.
So let's do that.
Let's click on this open tile palette and I'm gonna replace that.
So let's select the eraser tool from here.
And we're going to move.
We're gonna erase this.
Something like this much.
And this seems pretty great.
And we also need to remove this grasses as you can see.
So let's select the grass tile map.
Underneath our grid game object.
And let's select the eraser tool from this tile palette.
And we're going to erase it.
So we're going to erase it like this.
And this is this seems fine now.
So we need to adjust it over here.
So let's select the ground trials.
And we're going to select the edges of the tiles edges tiles.
So this basically this.
And we're going to paste it something like this.
And this seems pretty much cool.
As you can see.
And I guess this is fine.
And I'm going to have a some you can say ropes and empty space somewhere around here.
I'm going to do that basically.
So what I'm going to do I'm going to select my ground tiles or this tile map, and I'm going to have
some, a pendulum, something like that.
So I'm going to select this and I'm going to move this one here I guess.
And I'm going to move this uh or what we can simply do.
You and I guess I.
I want to move it a little bit up.
So what I'm gonna do is select the move tool from here, which is the shortcut key is S.
And I'm going to select this area in order to move it a little bit up.
So we're going to select this next tool which is the uh move selection.
And the shortcut key is M.
And I'm going to move it a little bit up.
And somewhere around here something like this.
And I'm going to click I'm gonna uh just gonna have a second as well.
So I'm gonna move this here.
Sorry.
This shouldn't be.
And we're gonna have some ropes and we don't want those.
Uh, basically, we're not going to attach any collider to those ropes.
So this player game object just easily passes through.
So that's why I'm going to select my create game object.
Uh, in my hierarchy underneath this crown underscore three game object.
So let's right click on this create game object.
Then go to 2D object and then move over to this tile map and then click on this rectangular rect rectangular
and this tile map.
I'm going to call it something like ropes and ropes ropes.
And now we are ready to paste our ropes.
And ropes are something like this as you can see.
And I'm going to paste it from here.
And we can just do is as well.
Sorry.
This will be this one.
I guess.
And I guess this is fine.
So what we're going to do now we need to just erase this for now.
Let's select the rope.
I don't know, it's not fitting at all.
Do do do do do do do do do do do do do do do do do do do.
I don't know why it's not fitting.
So let's select the ground tiles and I'm gonna erase this.
Let's select the this one.
And this seems fine now.
And let's select the rope style map.
Underneath our game.
Great game object in a hierarchy.
And we're going to paste it.
So I really don't know why.
Or we can just leave it like this.
So let's leave it like that.
And we can simply paste our ropes you can see over here.
As you can see.
And this seems pretty much fine.
And we're not going to attach any collider, uh, this to this, uh, rope style map.
Uh, any collider.
Basically, if we select our ropes, then go over to Inspector, click on this add component and we
can simply find our Tilemap Collider 2D and we can attach.
But as you can see we attach Collider.
So this player game object not going to able to pass through this uh these things.
So that's why we're gonna remove our collider 2D.
So we're going to select our ropes.
Uh, you can simply say rope style map.
So let's select that.
Go over to Inspector and we're going to right click on this Tilemap Collider.
And we're going to click on this remove component because we don't want to attach as you can see now
we just removed uh, those uh individual colliders.
So this player by now just gonna able to pass through this, uh, things.
And that's, uh, that's the thing.
I hope you get the idea that what we're really doing.
And now what?
I'm going to select my ground, underscore three game object, uh, three game object.
And let's move over to Inspector, then overrides and then apply all.
So the changes I made over here in this ground underscore three game object, it's going to be saved
into this ground underscore three GameObject prefab as well.
But before it we just forgot to do this one.
So we need to adjust our edge tile edges over here as you can see.
So I'm going to select my Create game object underneath my hierarchy.
And we're going to adjust this.
So let's select the ground tiles.
Let's click on this open tile palette.
And we're gonna uh just arrange our edges or we need to finish the edges as you can see.
So I'm going to do it something like this.
And also I want to remove some grasses from here, as you can see.
So we need to remove.
So let's select the grass tile map underneath our grid game object.
And we're going to erase that.
And this seems pretty much fine.
As you can see.
And let's select the ground underscore three game object one more time in our hierarchy.
And we can just go over to Inspector Overrides and then click on Apply All.
And that's it.
I hope you get the idea.
And I'm going to press down Ctrl s in order to save my project.
And I'm going to create multiple grounds, something like I'm going to have ten or you can just create
as many ground you want as we have done this ground underscore one, two and three.
So basically do the same thing.
How many types of ground that you want.
You can create.
So I'm going to create something like more um ten or something like 7 or 5 more grounds.