An introduction to unity
Now that we have Unity installed, let's dive right in and create a project and then take a quick overview of the interface. Perform the following directions to create a new Unity project:
- If this is your first time running Unity, at this stage, you will have a dialog with a button allowing you to create a new project; click on the NEW. For those of you who have jumped here from another section in the book, be sure to launch Unity and make sure you are logged in with your Unity account. From there select the NEW project button at the top of the Unity start page.
- The project dialog will open. Enter the project name as GameAudioBasics and then keep the defaults for all the other settings as shown in the following screenshot:
- After you fill in the Project name, click on the Create Project button.
- Unity will close the dialog, and you will see a progress dialog flash as the project is initialized and the interface loads. When Unity is done loading, you will see a screen that looks similar to the following window:
Now that we have Unity running, let's review what each of the main windows or elements are for. You can follow along using the reference numbers shown in the preceding window screenshot to match the items in the list here:
- Hierarchy window (1): This window shows the currently displayed scenes and scene elements called a GameObject in Unity. Currently, there should be a scene labeled Untitled in the window. Click on the arrow beside the scene to expand it and then click on the items beneath the scene. Notice how the other windows change depending on your selection.
- Scene view (2): You can think of the scene window or the view as the design canvas for your game project. In this view, you can select and move objects around using the mouse or the principal direction arrows (the colored arrows). Feel free to select objects in the view and move them around. Don't worry about moving things out of place or getting lost as we are creating a new scene before we start building anything of importance.
- Inspector window (3): This window exposes and allows you to edit the properties and components of the currently selected GameObject. A lot of the time you spend working in Unity will be editing values in this window. Again, feel free to explore this window by editing some properties of a GameObject.
- Project window (4): This window shows all the resources or assets you have in the entire Unity project. As you can, see the project is currently quite bare. Not to worry, we will be quickly adding new assets.
- Game view (5): This window or view shows how the game will look to the player. It differs from the Scene view because it only shows what the player sees. If you click on the game window tab, you will see a sparse view of the ground layer and sky. Again, this is because we have yet to add anything interesting.
- Play mode (6): This is the set of buttons at the top of the Unity interface control running the game in the editor. The buttons allow you to play and pause the game play. If you click on the play button right now, not much will happen other than the Game view will present itself.
At an advanced level, that covers the main elements of the Unity interface without getting bogged down in too many details. It could very well take you months or years to become an expert in using all the features of Unity. So, in order to not overwhelm you, we will only focus on the relevant information you need to complete an exercise.
So far we have been looking at an empty project and scene. In the next section, we will import a project from the Unity Asset Store.