- One of the most fun parts about game development is
making your own levels. Look at the Unity has an amazing
tool for quickly creating and prototyping 3D
levels called ProBuilder. So in this video, we'll have a look at how to use ProBuilder to create your own levels. I'm going to be making
an FPS level inspired by one of my all time
favourite Counter-Strike maps. See if you can get guess which one. Also this video is sponsored by Unity. Also the results of the
community Game Jam are in. A huge congratulations to Back and White for winning over all and to all of the category winners. You guys really did an amazing
job on all of the games. If you're a winner, please visit the brackets
discord on information on how to collect prices. Also special, thanks to Infinity PBR for his support on Patreon. And just a quick reminder
that we will be rebroadcasting the Unity keynote tomorrow the 23rd. Here's the time when the event will start, if you don't want to miss out on all the exciting announcements. So, without further
ado, let's make a level. So first of all, you want to make sure that you're using Unity 2019.2.3 or later. And ProBuilder is a package, so to instal it, we need to
go Window, Package Manager, here want to select all packages
and search for ProBuilder. So select it and hit instal if it isn't already, you can also update it here. I'm using version 4.0.5, so anything later than
that should be just fine. And I'm actually also going to instal another package
here called ProGrid. So ProGrid is a package that
works really well together with ProBuilder because it ensures that everything we do snaps in place in order to stay on a grid. I really recommend working
with the two tools together. So semi select it, hit
installed, or update, and I'm using version 3.0.3. And with that set up, we are ready to open ProBuilders. Let's go tools, ProBuilder,
ProBuilder window. And this is going to open up a
window with a bunch of icons. You can always right-click
and switch to text mode if you find that easier. However, I'm going to
be working with icons. You can also go window, and change from a floating
window to a dockable window if you want to place it
inside the editor like this. However, I'm going to be
using it as a floating window, because it allows me to
maximise my scene view and still have it here. And now we're ready to start
creating the base of our level. So to do this, we want
to create a new cube. We could of course just hit
the new shape tool here, and that's going to create a cube for us. However, we can also
hold down Alt and press. And this is going to allow
us to change a few settings. Here we can choose the type of shape. I'm just going to leave
this as cube for now, as well as some dimensions. So I want my level to be 40 on the X. Let's make it one unit tall. And one of the really cool
things about ProBuilder is that if our level is symmetrical, we can just build one side of it and then have ProBuilder mirror everything to the other side. This is perfect for this map here, because as you can see, it's complete these symmetrical. So for our length here, let's make it half of what we want. I'm just going to set mine to 55, which if we mirrored to the other side, you can imagine makes out a
pretty good length for a level. Now let's hit built, and we've now created our
first BroBuilder object that we can start editing. However, I think this material here, the default material,
it looks pretty dark. So I'm just going to go ahead and create another material for this. Let's go to project, hit create, material, and let's just call it default. And we can just click and drag
this to apply to our cube. Of course, nothing currently happens. But if we go ahead and
make this a bit brighter, we can see that we've now applied it. We can also go in here and add a texture. You can of course choose any texture here, but I'm going to use one that comes with ProBuilder called Gridbox. I find it's really nice to
work with when prototyping. In order to select it because
it's inside of a package, we need to unhide textures by disabling this button right here. And we can simply search for Gridbox. And it's this one code Gridbox default. And as you can see, this creates these nice
grid lines on our material, which I really like. And to save ourselves
from having to drag this onto every object that we create, let's just make it the default
texture for ProBuilder. So to do this we'll go edit, preferences, make sure it is the ProBuilder, scroll down to more settings, and here we can simply
drag in our material. So at this point, it's
time to start modelling. And as we talked about, it's best to do this on a grid. So let's just go tools, ProGrids, and open up the procreates window as well. So if we go ahead and
select our cube right here, you can see that our selection mode is currently set to object. So we select entire objects at a time. The second one is called Vertex, where we can select individual
vertices or corners. You also have edge, which
allows us of course, to select edges, and of course face where we can select entire phases of an object. So the first thing that we
need to do here is create some balls surrounding the level. To do this, we need some extra geometry. We can really easily insert geometry by selecting an edge like this one here and hitting the insert edge loop button. If we press this, we can see that we create a loop of edges that go all the way around our object. And I'm just going to take this and move it all the way over here to create a one unit wide wall. We'll also select an edge that
goes in the other direction, insert edge loop, and you can see that we've now created a perpendicular edge loop. So I'm going to place this
one all the way over here, and do the same thing
again for our right wall. There we go. I'm not going to create a wall over here since this is where we're
going to be mirroring to the other side, and we don't want a wall
to run through our level. By the way, if you accidentally
de-select an edge loop, you don't have to go all
the way around like this. You can send the double-click the loop and it's going to select everything. So now we can switch into face mode and select all the faces,
where we want to place walls, We then hit extrude to create
our walls and move them up. Another shortcut for this
is simply holding down shift and moving. This is a really handy one. So now we've created the
ground and walls for our level, and we're ready to make the pole itself. Now to do this, we need
to add some more geometry to create the pool from. Remember when using ProBuilder, you can also create new shapes and combine them to make your level. And we'll definitely do that later. However, here we are going to
make the base in one piece, since it's a bit more optimised and it makes it super fast to mirror. So stay with me here, even though it might be a bit
hard to wrap your head around. So I'm going to change to
the ed selection mode here, and so like this edge right here, and we're going to insert some edge loops. So let's press the button,
let's move this over, and another one. I'm also going to select this one and create one in the opposite direction. And here I'm going to
leave a bit more space. Then we can change to face selection, and I'm going to select the
face in the centre here. Now with this selected,
we can hit extrude. I'm going to change to the scale tool and move everything in a bit so we can see what's happening. So we now have this upper face here, and I want to make sure that the walls of the pool itself are also one unit wide. To do this that's changed to edges and simply snap these into place, one unit from the sides. Then we can select the face once more, put this back on ground level. And now we're going to take this, hold down shift and
select the bottom face, and it's hold down shift in order to extrude the
entire pool area down. Now this creates a
really nice pool in here, but there's a bunch of extra faces here that we really don't need. Remember, we're going to
be mirroring this thing. So these phases here
won't be visible at all. So to fix this, that'S simply go ahead and select one and hit backspace to remove it. And I'm just going to go through and do this for all of them. I'm going to do the same thing
with the top face right here, and as you can see, we have two edges here
that we just need to align, so that's simply snap these back in place. And if we go to the other side, we can see that there's a face still here. So let's simply select
that and remove it as well. And so now we've opened up a pool and made it ready to mirror. Again, this is a lot of geometry we work and you can get as complicated
with this as you want. This is the super proper way to do it. But as long as it works for you, I just recommend having
fun with this tool. So now we've created the base of our level and we are ready to mirror
it to the other side. So to do that, let's
change into object mode and let's hit the mirror
button right here, but let's remember to hold down Alt so also that we can also
choose a few settings. First of all, we need to make sure that duplicate is set to Yes, in order to make a duplicate of the object and not just flip it. And we also need to choose
the right access to mirror on. As you can see up here, we want to mirror on this Z-axis, so I'm just going to hit Z and hit mirror. And there we go. And now actually starts
to look like a level. Let's also create some
quick placeholder water. So that's hold down alt
and hit the new shape tool. Let's change the shape to plane. I'm going to set my width to 24 and my length to something like 74. And if we move this in place, and this is the really cool
thing is that we can move this while generating that should
fill up the entire pool. Yup, that looks good. And if we move this up a tiny bit, so it's just one unit from
the ground that is perfect. Let's go ahead and hit built and close the shape tool here. And we now have an object for our water. Of course, the currently
looks really, really boring. So that's going to create
a quick material for this. That's a create material for water. It's drag this onto a water plane, and it's just changed the colour here to a quick bright blue, awesome. So next up, we're ready
to start adding the walls and platforms at the ends of our level. To do this, we again going
to create a new shape, so let's hold down alt and click. :et's change it back to a cube and let's make this
something that 22 units wide by eight units tall, and two units on the Z. That's it built and drag this up and place it at the
centre of our level here. I'm just going to leave a bit of space so that players can walk across as well. Of course, this is currently just a very boring wall type object. So let's go ahead and
add a platform up here that players can use to peek over. To do this again, I'm going to use the exact same technique. I'm simply going to stick an edge, insert a few edge loops. You can also just press all view, select the face right here and hold down shift to extrude it upwards. And we now have a platform
really, really easy. Also we of course also need
to cut a hole in this wall so that players can sneak through. And again, we do this the exact same way. So we switched to ed selection mode, and I'm going to add
two vertical edge loops as well as one horizontal one, and then going to select
the face right here. And we are going to extrude this face. So I'm going to hold down shift, but instead of extruding
it outwards like this, we're going to move it two units in. Which is the width of a wall. And as you can see this right
away cuts a hole in the wall. Of course, there's currently
a fase blocking it here. So we can't see through, but to change that we simply hit backspace to remove the face. There's also a face on the other side that we need to get rid of. So again, just backspace to remove it, and we can now walk
through the wall, awesome. Next up, let's create a similar ramp that leads up from the water. To this, let's again, create a new shape, hold down Alt, let's select cube, and let's make it four by four
by six, something like that. Let's switched to object mode here and move it over to see if it fits, and see if it touches the ground. It does not. So let's make it a tiny bit taller. Let's see five units are better, perfect. Now let's hit built? And of course, this is
not really a ramp yet. This is just a cube. So to fix this, we can use
the Vertex selection mode, and here we're going to select the top and bottom left vertices. And we just need to merge these together. This is cold collapsing vertices. And the button we use is this one. As you can see it snaps
them right together and we'll do the same
thing for the right side. We can then select this edge right here and move it down. And we have a ramp it's that easy. Of course, on the other side here, we need some stairs that
lead up to the platform. So again, let's create a new shape and there's actually a
type of shape called stair. That simply generates good looking stairs. So let's go to object mode. Let's rotate this over. I'm holding down control to
make sure I snap in place. Let's place it somewhere around here. Let's have the width be actually three and seven and seven. It's also move it up so that
it stands in the ground. And we can play around with
the amount of steps here. I'm just going to leave mine at 12, let's hit built, and I'm going to move it over a tiny bit. And I actually want to go
ahead and extend the end here. So that's a tiny bit of space for the player to stand on. So let's select the face right here and simply move it over. And that's just what we need. We then take this entire
object and duplicate it by pressing Shift + D, and then simply rotated around and place it on the other side, awesome. So that's pretty much it for
this entire part of the level. Now we just need to go ahead and mirror it to the other side. And I think the best way to do this is simply combine all the
objects that we've created so far and mirror them together. So let's remove the
mirror object right here and inside of the hierarchy, we can now select, first of all, our base here, that's actually just call it level base. And here want to make sure that the base of your level is
currently centred on (0,0,0) So I'm just going to hit reset on this, I'm then going to just
select all the objects and move them over. There we go. And we can also take the level base. And here you want to take note of where the pivot is. In my case, it's in the
bottom right corner. As you can see here, if your pivot is just placed
in the centre of the object, you need to make sure that
you've selected pivot up here. The reason why this is
important is because when mirroring objects,
it's based around the pivot. And sometimes when we merge objects, which we're going to do now, let's select all the objects that we have except for the water. And inside ProBuilder
that said merge objects. You can see that the pivot shifts. Now, this is not a problem since because we've
centred our entire level, we can simply hit the
freeze transform button, which is going to reset
the pivot to the centre, which is right here, awesome. So now that everything is merged, we can go ahead and mirror our level and there you go. That's pretty much all we
need to do for our base level. Now we can just scatter
around a few obstacles and to do that, let's go ahead and add a new object here. Let's create a cube. Let's make it two by four by seven. Let's hit built? So this is going to be a bit of cover that we can line up to the wall here. And I'm just going to go ahead and use the extrusion
tool to model this out. There we go. Now we can just place
this around our scene. I'm going to hit Control + D to duplicate and flip it around. And once we are happy with that, we can select all of them, duplicate, and move them to the other side. And I'm just going to flip as well. So inside of the inspector here, I'm going to select
the scale two minus one and just move them right in place. And that's all we need
to do for our level. At this point, we were ready to pop in a first person controller. Of course, we just need to make sure that all of our objects have Colliders, by default they should have
a Mesh Collider applied. However, when merging
objects, this might disappear. So let's just select
or two merged objects. Let's hit add component, and let's select a Mesh Collider, and that's all we need to do. We now pub in a first person player, I've gone in and created a very simple and quick one right here. This is of course available
as a download together with the rest of the project and of course this level. So that's just disabled
our main camera here, and let's go into the game view and maximise and try and play. And as you can see, we can
definitely move around. We can go upstairs, we can jump over obstacles, and the entire level is indeed working. So really, really cool. That's pretty much it for this video. If you enjoyed it, make
sure it's subscribe so don't miss the next one. And from here, it's up to you to start
making your own levels. If you want to learn more about ProBuilder we'll of course have a link
for that in the description. On that, thanks for watching. And I will see you in the next video. - [Announcer] Thanks for the
awesome Patreon supporters who donated in September, and special thanks to
Andrew Kalineko, artArmin, trueVRsystems, SIMMER.io, Alexander Blair, Cheetah3D, Jeff Johnson, InfinityPBR, Cyborgmummy, Dennis Sullivan,
Chris, Sheriff Abdulla, Faisal Marafie, Fangzhou
Long, Leo Lesetre, Clinton VanSciver, Shreyas
D, Derrick Heemskerk, Ruonan, Tim Afholderbach, BruinsCat,
Naoki Iwasaki, Gregory Pierce, Larry Tweed James Rodgers,
Rob Fearn, Pacome Berner, Erasmus of EekGames,
Robert Bund, Corey Jackson, James P, Antony Patton, Kirill
<KaiZer> Sviderskyi, Obreezy. You guys rock