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 learn how to customize our layout, and then we'll learn how to navigate in our scene view. What I want to do first is actually go ahead and show you how to customize your layout. And you know, Unity really has a great default layout, and this is the wide layout. It gives you a good ratio between your scene view and the other panels inside of your interface. But in some cases you might actually want a different type of layout. And what I'm going to show you first is the predetermined layouts that Unity gives you. So if we hit this drop down box, we have 2 x 3, we have a four split, tall, and wide. So the 2 x 3 is going to give you your scene view and your game view split into two different ones. And then you have your hierarchy project, and then your inspector. We could go to the four split where we have our top, front, right, and then our scene view here where this is just a perspective. Then we have hierarchy project and inspector. Some might actually prefer this layout, so if this is for you, you can do so. Now what I'm going to do is actually stick with just the wide view. This is where we're going to be sticking throughout our project here. I just find that this is the most comfortable for me, but if something's different for you, you go right on ahead and use that. Now, the next thing that I want to show you is how we can actually customize the layout specifically to what we want in our project. So what I mean by that is we can actually couple up some different views. We can put different panels inside of here, so I can actually couple up my project and my hierarchy panel together. So if I click and drag on my project, I can actually drag it right over here next to hierarchy. And now I have these two tabs that I can switch to between hierarchy and project. They're no longer two different windows, or two different views. Now, if I want to reorder these tabs, all I have to do is click and drag and they'll reorder themselves there. Now if I want this to be on a different panel altogether, I can just click and drag on this tab and drag it up to the top here, and I've got a project and hierarchy. Now if I don't like how they're set like this, I can just simply click and drag and bring it right over here to the right, and this split into two panels here just like we had before. Now you're noticing that I'm kind of sizing these panels, or these views. And all I'm doing is just hovering over the borders of these panels and clicking and dragging to get different sizes. Now you could also do the same thing between panels, and resize that way as well. Now, we may want to actually go ahead and open a brand new tab. And we could do this by clicking on our Options button on our pane view. If I click on this, you see that I have Add Tab. And I have a list of tabs that I can actually go ahead and associate, or append, to this specific pane here. So I have scene and game which are already in my scene already in my layout. I have inspector, hierarchy and project. Now the three that I don't have is profiler, animation, and asset store. So I'm going to go ahead and add an animation panel here-- an animation tab. And you'll see that this has coupled itself with hierarchy and animation. Now I can go ahead and click and drag this off and create a brand new animation panel, and that's going to take up more of my room on my actual scene view. Now if I want to close this out, all I have to do is click on the Options and Close Tab. Now sometimes we might actually accidentally close out one of our needed panels that we have. So, for example, our project panel. I might actually close this out by accident. And we might want to get that back, because the project panel is going to be really important for us in our project. So I could do this a couple of different ways. I could go ahead and in my hierarchy pane go ahead and click on this and do Add Tab and then Project, and then it just adds that tab to the specific pane. And then I can go ahead and reorder it anyway I want to just by clicking and dragging on my tab and placing it in any position that I want. Now I could also-- let me go ahead and close this out again-- I could also go up to Window in my menu bar and then go to Project and open it that way. And this is just going to give me a broken-off tab here. And all I have to do to make this a tab that is part of my interface is just click on the tab and drag it in any position that I want here. And I could put this really anywhere on my interface. So there we go. So that's how we can customize our layout inside of Unity. Now the next thing that I want to show you is how we can actually navigate inside of our scene view. Now you'll notice that whenever we started customizing our layout, my level kind of went off in a pretty far distance inside of my Unity editor here. And the first thing that I want to show you is how we can actually frame selected. So if I select an object in my scene and I hit F on the keyboard, it's going to frame that object to my view here. It's going to frame that selected object. I could do this by going to Edit and then Frame Selected as well. Here you could see the keyboard shortcut. Now, we could also maximize our views here. So I want to go ahead and just hit the space bar to do that. And this will maximize it out to where I have the maximum amount of working space here. Now the space bar is only going to work wherever your mouse pointer is at. So, for example, if I have my mouse pointer hovered over my scene view here and I hit space, it's going to maximize that view. If I have it hovered over my hierarchy, it's going to maximize that view. So just be very careful with that. So if you actually hit the space bar, just remember it's actually just going to maximize the view that you're hovered in. All right, so let's get into actually navigating in our scene view, and we can do this a couple of different ways. The first way I'm going to show you is going to be the most friendly to Maya users. So if we hold down ALT on our keyboard and we hold down the left mouse button and we drag around, this is going to orbit around our scene. If I hold down ALT and hold down the middle-mouse button, or your scroll wheel, this is going to pan our view. And then finally, if I hold down ALT in the right-mouse button, this is going to zoom in and out. So if I pull down on the mouse, this is going to zoom in. If I push up on the mouse, this is going to zoom out. All right, now the next way that we can actually navigate inside of our scene view is using the scene view gizmo here. And the scene view gizmo is actually going to give me a couple of different predetermined destinations if we want to think of it that way. So if I click on the x-axis, this is going to move me to my right view. If I click on the z-axis, this is going to move me to my front. If I click on the y, this will go to the top. Now I could use any one of these other predetermines, that's fine. So this one's going to move us to the left, and this one to the bottom, and then we have the back as well. Now, if you're pretty partial to that perspective view, you can just click on this yellow square in the middle, and this will bring you right back to that perspective. Now one other view that we have besides our perspective is called our isometric view. And we can access the isometric view by holding down Shift and clicking on that yellow box as well. Now you'll see isometric looks a little bit different. We don't actually have our object coming out at us. It doesn't give us that fisheye look. So if we go to Perspective just by clicking on that yellow box, you can see that our level kind of looks like it's growing as it comes toward the camera. Whereas isometric, holding down Shift and clicking on that yellow box, doesn't actually have that effect. Now, the final way that we have to actually navigate in our scene view is using the flythrough mode, and this is very, very handy. To do this, it's very simple, we hold down the right-mouse button and we use the W, A, S, and D keys. So if I'm holding down the right-mouse button and I hit W, this is going to move in and I can actually steer with my mouse. Now if I hold down S, this is going to move backwards. If I hold down D, this is going to move to the right. If I hold down A, this is going to move to the left. Now if I hold down Q, this is going to move down, and E is going to move up. So we have W, A, S and D, and then you have Q and E to work with. Now sometimes we might be zoomed out really, really far, and we want to move a little bit faster with our flythrough mode. And this can be done by holding down the right-mouse button, W, and then holding down Shift, and this will basically multiply your move speed. Now let's go ahead and hit this Perspective box here, just to kind of bring us back here to where we're at. Let's hit F on the keyboard, and it will bring us back to our scene here. So that's how we can actually customize our layout, and then also navigate in our scene view. Now what we're going to do in our next lesson is actually create a brand new project. And then we'll talk about working with packages in our Unity game engine.