Join Craig Barr for an in-depth discussion in this video Intro to the Unity user interface, part of Unity 3D Essential Training.
- The Unity User Interface, or Unity UI, is broken into four basic components when it comes to the main area of user interface. We're going to take a look at this, and we're going to take a look at the basics of the menu bar here in Unity. So the four basic components of the bulk of the UI here start with on our top left. By default, the Unity user interface is laid out to have the hierarchy window in this top left corner here. Now the hierarchy window is where we store everything related directly to what is in your scene.
To the right here you can see this view port here, underneath the scene tab. This represents everything that is live in the scene. And as an example right now, because we're just starting out, you can see that we have a main camera, and we have this thing called directional light. And that's all we have in that scene right now. So everything that is live in that scene will be populated here underneath the hierarchy. So as we add geometry, effects, anything else to there, we'll actually see this build in here, and we want to keep in mind that we will want to organize that as we go forward.
So we can actually build a directory structure in there, much like we did in our project window down below. So we've seen the hierarchy window, and we will see that this will build up over time as we add more objects to it. Let's go to the right here again where we see the scene view. Now this is the second primary area as a view port. This second primary area is actually divided into two main view ports here. So we have the scene view, which is where we're going to construct and build light and work with animation, and everything as we build and construct our scene.
The game view is actually a preview of how everything actually looks, in game. It's important to note that that is a kind of a test area, of looking at how everything comes together as a game view. When you actually or produce or package your actual application out of Unity, it will look even nicer than what you're going to see in game view, because game view is a preview as to how everything is being assembled from scene view. So for the most part, as we build, we will be constructing everything here in scene view, and as we get to the point where we have things that we can play back with and work with, we'll be jumping back and forth into game view there as well.
Now, there is this other tab here, if you have that other, asset store, which we saw previously. If you don't have it open, you can find it under Window > Asset Store, and all that's going to do is allow you to search for free assets or even purchase content from the Unity Asset Store, which is an excellent resource there as well. So we've seen the hierarchy view, we've got our view port area, which we've seen the basics of it being divided into two, the scene view for construction and the game view as a preview of in-play, and we have over here on the far right is the inspector window, and you'll see by default when you open it up, typically you'll find this services tab.
Now, services is going to give you all your analytics on your games that you may build, anything related to the performance of your game, you can actually get into monetizing ads for your games. This is a tab that lets you monitor all of the administrative or kind of business side of the productivity of your application. What we want to look at here, though, is this inspector tab. Now the inspector tab is the attributes or parameters for anything that may be within the scene view or the hierarchy.
So for example, if I just click on the main camera, you'll see that it activates it, we see it's selected in the scene view, and we see in inspector all of the attributes related to that camera in there. So we have a transformation tab, we actually have any of the specific attributes to that camera, so it's referred to here simply as camera, and all of the different settings that are required to work with that camera in there as well. Same thing for this directional light, if I click on that. Here is everything related to that specific type of light, everything from color to the intensity and so on.
So we've looked at these three areas up here. The fourth major area is the Assets View, or the project window, where we can look at all of the assets and content directly related to our project. Now it's worth noting that this window is a direct reflection of what is in your Unity project in the Windows Explorer, so we as we add content into these folders, your actual content that lives in your operating system, whether it's Windows or Mac or whatever it may be, you will see reflect directly into here, so this is a direct mirror if you will, as to what's happening in your actual outside operating system content directory.
This is important to keep organized, because of the amount of different objects that we're going to be bringing in. It's a good idea to keep everything categorized like we've done here, to keep everything in place so it's very quick and easy to find. It also makes it easier if you build things like scripts, or if you're doing anything where you need to reference a resource in your assets, this makes it a lot easier to know specifically where pieces of content live. It's worth noting, in this project window there are a couple different ways to view things.
We simply have this ability to actually go in and click on folders and see subfolders or any of the content that may be inside those. As this gets bigger, or if it gets really big, we have a way that we can actually zoom up if we wanted to see these folders larger, or we can zoom right down to even a little directory structure here. That actually mimics what we see on the left over here as well. So this is very handy if you get into a project that has a lot of assets going on in the project window, and this bar becomes very long to actually cruise back and forth, up and down with, you can set this to be the directory structure in here, and it'll just keep populating this in columns for you.
For now, we're just going to leave it as the little thumbnail folder view. So we've looked at the four main components of the bulk of this user interface. Let's take a look at the top here. This is the main menu area here for Unity. Anything related to files coming in or coming out, or any of the other things that we might do in other windows can be found up in here. An example of that is, underneath the file menu, we can simply save scenes, we can open scenes, we can create a brand new project, much like we did when we started this project.
We actually created it at the Unity splash screen interface. We can create one just the same way here by hitting new project. As well, you can see that we have other commands underneath the edit menu, common ones like cut, copy, paste, duplicate, delete, and of course all their associated hot keys on there. And then Assets. Now this Assets menu is the exact same way that we can access this here from Assets, you can see that we have things like create folders, like we've been doing, as well, if we right click within the project window here, with my assets, you'll see that we get the exact same menu in here to build access to that as well.
Now game objects are something we'll dive into a little bit later, but this is where you essentially will create anything that is a major component to the game, things like cameras, lights, or even 3D or 2D objects in here as well. The component menu here is actually the exact same menu that we can find. You can see all these different areas in this menu. That is directly related to the inspector window. So you see we have this add component, or we can simply click on there, and you see that we have mesh all the way down to these different areas here of components, and we'll definitely dive into those a little bit later but this is the exact same menu on that as well.
Now the windows window here is going to give you everything directly related to all of these windows that we have in place in here. So if at any time we need to open a different inspector window, or like we saw with the Asset Store, we can access all these different commands in here to open them up as well. And of course we have the help window there. So that's a tour of the user interface for Unity 2017.
- Setting up a Unity project
- Customizing the UI
- Navigating Unity
- Exporting and importing assets for Unity
- Creating and organizing new materials
- Creating, exporting, and importing prefabs
- Level building
- Creating and implementing animation
- Optimizing collisions
- Baking lighting
- Packaging your Unity project