[MUSIC] In this lecture, we'll create an initial sandbox level that were used to test our game mechanics as we implement them. Our objectives will be to use unit snapping to place game objects are we design our level. Use vertex snapping to place game objects as we design our level. And design a more interesting sandbox level to test out our game mechanics. So let's go ahead and make our scene a bit more interesting to navigate. We'll do this by adding a few more ground elements and platforms. So let me go ahead and zoom out a bit on the Scene View. So far, we've just been taking our elements and essentially dragging them and dropping them where we want to. But when we start to do true level design, we really should use snapping to help pull our level together. So under Edit, Snap Settings. This will bring up the snap settings and you can see right now the settings have 1, 1, 1 set for x, y and z. So with a game object selected and clicking snap all axes, it'll essentially snap that game object's vertex point based on those settings. So one thing that you can do is, let's move this over a little bit and Snap All again. Let's say we wanna have a parallel structure here of platforms. So one thing I could do with my platform is, I can simply select it and then duplicate it. So Edit > Duplicate, or Ctrl+D on Windows or Cmd+D on the Mac to create another platform. And then if you switch to the translate tool, and hold down either Ctrl on Windows or Cmd on Mac, and then move it will snap based on the snap settings. So we know each of these platforms is two units long, so if I move over two units It will snap at basically exactly into place. So let me duplicate again, and then drag it over again. And we've got basically three platforms here, so let me select all three platforms. And then duplicate to make three new ones, holding down either the Ctrl key on Windows or the Cmd key on the Mac. I can then drag over, making sure all the snapping's happening, and get sort of a symmetrical design here. And if you're ever questioning, if you look at a game object, like any of these platforms, it should be set to the exact unit because of the snapping that I've done. If not, you can select them and hit Snap all axes, and they'll snap. We can, for example, the ground piece here, Dirt_Middle is not snapped into place. If I hit Snap All, it'll snap it right into place. I don't really want it here, I actually want it down below. So once again, I can hold my modifier keys or Ctrl or Cmd, and drag it down below Sparty to make ground down below Sparty. And of course the same thing for the tree. If I hold down my modifier key and move it down, you can see it snapping down to that pivot point. So, in this case, if I wanna place it sort of right on the ground, I might have to freeform that to get that right where I want it. But there is actually another type of snapping called vertex snapping, and vertex snapping is really the best way to do level design. So once we've got maybe our standard piece in place like this ground piece, we could use vertex snapping to snap to the vertices of the game object. So let me show you what I mean. So let me go ahead and grab for my pre-fabs, the dirt grass one side that has basically dirt with grass in top. Go ahead and drag it out here, and I'm just gonna go ahead and get rid of this dirt grass middle. Delete that. And we'll move it over. And once again I could use the snapping settings to snap it into place. Now that I've got that one defined, I could duplicate it and then hold down the V key and notice, let me zoom in a little bit on this. When the V Key is held, basically the control points will snap to the nearest vertice or the pivot point. So with that selected I can press on the mouse and hold and move over, and it's going to snap it right to the vertex. You can actually see this a little bit better if you use the rec tool. So we can actually see the vertices on the rec tool, so if I duplicate this one again, hold down the V key, it highlights that vertice. If I press and hold on my mouse button and then move over it will snap right into that location. So I get a perfect snap here. If you do this by hand, it's often you'll get it slightly off. And if there's a little bump like this, your character gliding along will hit that bump and kind of pop up because of physics. So once again we can hold down the V key and then snap right to that vertice of the previous game object. So I can fairly quickly using duplicate, holding down V, dragging over I can quickly design a level. Maybe I'll select a whole bunch of these game objects to duplicate. Holding the V key down let me zoom out a little bit and move a bunch of these all together. So I'm gonna make just sort of a big section of ground here along the bottom of the screen. Duplicate holding the V key down and moving those over. So I've got essentially ground along the bottom. Vertex snapping works great for something like this as well, where I want to put it right on the ground. So holding the V key down, I could essentially drag around, and it's gonna be snapped right to the top of the ground object. So, maybe I'll make a couple trees here just for sort of visual effect on each side of the ground. And we'll leave Sparty right there in the middle. So, we've got a real basic level set up here, but it's gonna be a lot more fun to navigate than what we had before. So, let's go ahead and test this out. [MUSIC] So, I've got the ground at the bottom, I've got the trees I can run behind. And of course I can jump up on these platforms. Can't quite make the jump between the platforms. And because the platforms extend a little bit off of the screen you can see you can actually run out of the world, we'll rectify that problem here in a moment. [MUSIC] But we're starting to get a game that's a little bit more interesting to play. A level that's a little bit more interesting. So using snapping, I think is a really important concept to master. Both the snap settings and the vertex snapping that we showed there. So let's go ahead and save our scene. This sandbox level will continue to be useful as we build our game. But note the sandbox level is not meant to be a final level that we ship to our players. Once all the game mechanics are in place, we'll work on creating levels for our players to play based on the mechanics that we demonstrate to be successful in the sandbox level. [MUSIC]