What you will learn
In this Unity tutorial, we will learn how to effectively utilize the game engine. Over the tutorial, we will learn how to use the Unity editor interface as well as how to navigate in the scene view. From there, we will learn how to import assets and how to create prefabs. Then we will shape our level even more by adding character controllers, colliders, lights, materials and physics. We will then finish the tutorial by learning how to use scripting in order to make our level interactive.
In this lesson, we're going to go ahead and finish up these last minute details to get our level looking really nice and sharp. So what I've done is I went ahead and took those pipe objects that we brought in in the last lesson and just spread them out throughout the level. So I put one here at the ceiling in this hallway, and I put one on the floor in this room. And I put a couple in this room here. So you can spread them out however you feel like. You should have enough knowledge to go ahead and move those around and snap those however you need to. So feel free to take the creative freedom from this point on, and you just really create your own level, and create your own rendition of this level. So what I want to do now is go ahead and create some piles of our crates and our barrels. So the first thing that I need to do with this crate that we brought in several lessons ago is go ahead and apply a material to it. So let's go ahead and give this a bump diffuse, because I have a texture map and a normal map for it. So let's go ahead and choose our texture map. And here's our crate. And let's go ahead and go to our normal map and choose the crate texture, our crate normal there. And we'll close this. And we'll do fix now. So now that has been applied. So now what I can do is go ahead and duplicate this. And I can just make a couple copies of my ammo crates here. And we'll just create a little pile here. And I'm just going to demonstrate a couple of design elements. Whenever creating things like this, we don't want these to be stacked up right on top of one another, because they have the same texture, and they have the same mesh. And they're just going to look like they're propped up, and it's going to look lazy. The design isn't going to be that great. So what I'm going to do is create another row of these. So I'm going to select-- let's select these three right here. Hold down Control and D and lift those up. And I'm going to offset these a little bit, make sure that they're right on top of our crates here. We don't really want these floating. So we always want to check that. So that's pretty close. We'll bring that down just a little bit there. And now what I want to do is actually stagger these out some, just to give it a little bit of characteristics, if you want to think of it that way, a little bit of personality. So something has happened. These haven't been sitting here all nice, and need, and untouched. It looks like somebody left out of here in a hurry with all this debris everywhere, and these fires going on. So we can expect these to be jostled around a little bit. So remember, whenever you're designing your levels, you always want to create a story out of this. So you want to do some special designs on this to really give this a story to go off of. We don't want this to be just bland and everything in nice, neat order, especially when the rest of the level says, something's been chaotic here. So let's go ahead and create a couple of these. So we're going to hit Control D to duplicate these. And let's put these on the ground. And let's actually rotate them to where they're on their faces. And let's drag this down onto the ground. Now, you could go ahead you create a package from another file that you already have. But I'm not going to do that at this point. I'm just going to go ahead and show you probably the way you would normally do this if you were building a level. If you just started out creating one, you're probably going to create piles like this. Now, I'm going to do one more. Control D. And I'm going to put this just in a really odd position, like it's falling through the cracks here. So let's go ahead and switch this from local to global, so that way I can push it straight down. And let's make sure that it's not clipping through any geometry. And let's rotate this along its local axis. So I'm going to switch that. And let's go ahead and position this a little bit better. So we're getting there. Let's go to move. And we're in our local-- let's pull this out just a little bit. Still want to come out. Don't want it to be right on top of this one. So now it looks like it's being held up by these two. And let's rotate it down just a little bit more. Still looks a little unnatural. So this is looking a little bit better. And we could actually put some physics on this and make it fall over in our level, if you wanted to do so. But I'm pretty happy with the way it's sitting there. So let's go ahead and just stick with this crate pile here. And now, what we can do is actually create a prefab of all these objects here. So let's go ahead and select all of these. Now, sometimes, whenever you're selecting something, and the gizmo is in the way, and you're trying to click on it through the gizmo, that's not going to work. So you may have to rotate around. So you can actually select the object away from that gizmo. Now, we've got all of these objects selected. Let me actually go ahead-- and let's select this one as well in here. And I want to deselect this one right here, because what I'm going to do is actually parent all of these onto this one. So I'm going to select these and drag them right on top of that ammo crate. And we're going to see this losing prefab several times. We're just going to keep clicking Continue. And now we've got that ammo crate pile. So let's go ahead and create a prefab for that. Right click Create. Prefab. And let's call this Crate Pile. There we go. Now, let's drag our ammo crates right on top of that. And let's rename this Ammo Crate Crate Pile, just to keep things nice and straight. So now whenever we select this, this is a prefab. And now we can go ahead and just copy this as many times as we want. So I'm going to hit Control D and grab my move tool, and just space this out. I'm not going to be real careful about where I'm placing it, or anything like that. It's just supposed to be fun. We want to break up our level and make it look nice and neat. So I may bring it over here on this side and rotate it to where it's offset a little bit, like it's been set up against this wall, and they've fell over and fallen into the hallway. And we can use this as a game element later on if we create some interactivity with the game, and we're going to use this for cover, or something like that, if you're going to do that in your own project. So let's hit Control D. Let's duplicate that again. And let's just space these out a little bit more. You could rotate these and put them anywhere you like. Like I said, this is the creative part of level design. You can do, really, anything you want to do. So now what we can do is go ahead and import our barrels, because that is one other prop that we want to use here. So I'm going to go ahead and leave the crate piles just where they're at for right now. You can go ahead and keep spacing them around and pause your video, and then go ahead and do that and come back. And then what we're going to do is just go ahead and place these barrels around. So we're basically going to be doing the same thing that we just did with our crate piles here. So let's go ahead and go to our meshes and props. And we're going to bring in a barrel. So now that barrel has been brought in. And what I want to do is go ahead and create a pile of these barrels. So I'm going to hit Control D, and just like we did with the crates. Now, before I do anything, let's go ahead and select our barrel and change our material here. You'll notice that it's still got that gray color on it. So let's go to Bumped Diffuse, choose our barrel color, and then we have a normal map on this. Make sure we hit Fix now. There we go. So now let's go ahead and continue on with our barrel. Control D. Just spacing these out again. And remember, we don't want anything that's going to be absolutely symmetrical and nice and neat looking, because we're trying to tell a story in this level. So we might bring this out and push it in a little bit, make it a little bit closer. And let's do Control D one more time. And let's pull this one back, just double up on this right here. And we're just creating a pile. So let's go ahead and select some of these. Here we go. And let's go ahead and Control D and stack these on top of one another. Now, when a barrel is red, and it's got what looks like some warning signs on it, and it's possibly got some sort of chemical in it, probably don't want to stack them up here. And maybe that's why this place is on fire, anyway. So like I said, that's all part of telling our story. So let's go ahead and select each different part here. And let's go ahead and move these around, give us that dynamic look like these have fallen over, or something like that. Not being real, real careful about how these are placed just yet. Just trying to get a good idea about what I want this to look like. And then we can really go in and fine tune our details. I'm going to offset these just a little bit, just so they don't look like they're placed perfectly on top of one another. Here we go. And I'm going to take this one back here and just tilt it over like it's actually trying to fall over. And it's just leaning up against the one that's already falling over. There we go. So now we've got a neat little barrel pile here. So let's go ahead and create a prefab of that. We're going to do that exact same way as we did the crate pile. So let's go ahead and select all of these. May have to zoom in pretty close to be able to select all of them. Whoops. Try that one more time there. Now, let's go ahead and select those, and put them right on top of this one barrel. And again, we're going to go through that prefab process of just hitting Continue. There we go. And let's go ahead and create a prefab. So let's go to that. Create prefab and call this Barrel Pile. And let's drag that barrel right on top of our barrel pile. And now that's a prefab. So let's go and rename this Underscore Pile. There we go. So now we've got this prefab. Now we can go ahead and drag this into different areas. So I'm going to hold down Control D and put these in a couple of different areas here. Rotate them around to whatever position we're looking for. So you can go ahead and spread these around wherever you want. You can actually go ahead and duplicate some of these fires and put them in different areas. You could really do anything you want to this level at this point. You are ready to go ahead and start moving around and really creating a story with this particular level. So the last thing that I want to do is actually go in. And I'm going to set up some doors. And I'm going to go ahead and show you how we can clean up our hierarchy. And then we'll set those doors up, and we'll get ready for our scripting session here. So we'll go ahead and we'll do that in our next lesson.