Installing and Getting Started with Unity
This article will be a quick tutorial on how to install Unity onto your computer, paired with a small getting started to begin familiarizing yourself with the capabilities Unity has to offer.
For this tutorial, there will be six parts. Below is the specific breakdown of what I will be covering, so feel free to scroll to whatever section applies to what you need.
- Installing Unity
- Creating a New Project
- Editor Overview
- Navigating the Scene View
- Creating and Manipulating GameObjects
- Materials (with a dash of Shaders)
Follow me along in this tutorial and you should be up and running with Unity in an hour or less!
To install Unity, head over to unity.com and hit the blue button that says “Get Started”. Hitting that button should take you to a screen like the one I have below:
When you click “Get Started”, you will likely start on the “Teams” page. Depending on your circumstances, you may need to purchase one of the team plans, but for this tutorial, I am going to work under the assumption you are using Unity for your own personal reasons. As such, be sure to select the “Individual” tab, and select the Personal plan. If you are a student in an accredited educational institution, you may have the eligibility to sign up for the Student plan if that is of interest to you. Once selecting your plan, you should be taken to the following screen:
Once the Unity Hub .exe file has finished downloading, open up and run the file and go through the installation process as you would when installing any other program on your computer. Once completed, you should find that Unity Hub is now available for use, and it should look similar to the image here:
As you can see, I have a few projects already set up here. If you do not find yourself on this screen (at least with the same tabs on the left-hand side), then you likely were taken directly to your Preferences/Settings, which is fine for now as we are about to check our license to ensure it is set up correctly. If you did find yourself on the screen shown above, to check your Preferences/Settings, click the cog/gear icon at the top right of Unity Hub. You should now find yourself on the following screen:
Now your license should be already set up as shown above. It is important to have this license because if you don’t, you literally can’t use Unity to create anything as Unity Hub will not allow it. If your license is not set up, I would suggest creating a Unity ID (which is just an account on Unity.com), and then be sure to sign in to this same Unity ID in Unity Hub [THISSENTENCE ISCONFUSING]. If your license still does not show once logged in, then select the button that says “Activate New License”, where a Personal license is an option to be selected. You should now be good to go to create a new project. If you are still running into trouble with this step, contact Unity Support.
Lastly, we need to install the Unity version we will be using. Back out of your Preferences in Unity Hub to go to the main page. On the left-hand side, you should see three menu options that say Projects, Learn and Installs. Select the Installs tab if you already are not there. You should find yourself on the following screen:
As you can see, I already have a few versions of Unity installed. To add a version of Unity to your Unity Hub, select the blue button that says “Add”. This action will open a pop-up that presents to you a few recommended Unity versions. If there is a version you would like that is not presented, you can check out the download archive which is linked near the top of the pop-up. Once you have your version selected, hit the “Next” button at the bottom right of the pop-up. You should now find yourself on the following screen:
The modules you include depend on what systems you want your game to run on. If you want to create a mobile game specifically for Android, then only include the Android Build Support (notice how there is a drop-down with more options for that choice). If you want to create a game for the Web, then include the WebGL build support. Once you have all of that selected, hit next, and your Unity Hub will begin to install that version of Unity with the modules you selected. Once installed, we can now create our first project.
Creating a New Project
Now that we have Unity Hub and our Unity version installed and ready to go, we can create a new project. At this point, you should be signed into Unity Hub with your Unity ID. If you haven’t done this, create your account and log in through Unity Hub. Once you do this, with Unity Hub opened up, make sure you are within the Projects tab. Once there, click on the blue button that says “New” (if you have multiple Unity versions installed, you can use the dropdown to select the specific Unity Version you want to use for the project). This action should display a pop-up like the one I show in the image below:
In this screen, you are presented with templates to start your Unity project with, as well as the ability to name the project and the location where your project will be stored locally. The template you select should be based on your projects and their needs. With that said, the Universal Render Pipeline is often a safe bet to use, and that’s what I will use for this tutorial. In terms of the project name, I will be naming my project “GettingStarted” for this tutorial. Once you have selected your template and named your project, hit the blue button at the bottom-right of the pop-up screen that says “Create”. When you do this, Unity will begin to initialize the project with your chosen template. This will likely take a few minutes. Once completed, you should find yourself within the Unity Editor for your project, which should look similar to the following (things will look different depending on which template you chose):
Now, your editor likely does NOT look like mine, but you should have a similar setup regardless. If you are interested in getting an editor layout like this or want to figure how to make your own, check out my article A More Productive Unity Editor Layout. For now, I will change my layout to match the default you are likely working with from here on out.
If this is your first time using Unity, especially if this is the first game engine you have ever opened up, I am sure the editor you were just introduced to can feel a bit overwhelming. Trust me, you are not alone in that feeling. The good thing is that there are a main set of views you would use within the editor, depending on your task and role for a project. For this tutorial, I will mostly cover views that pertain to Unity essentials.
The area surrounded by the red border is your Scene View. Notice how there are three tabs at the top of this highlighted area in the image, and take note of the fact “Scene” is the currently selected tab. In this view, you are free to manipulate the scene view camera as you wish, as well as manipulating any GameObjects in the scene. Click on the Game tab now.
The Game View differs from the Scene View in the sense that no editing is done on this screen, and only shows the final render of whatever is in front of the camera that is currently activated and being tracked in the scene. At this point, head back on over to the Scene View as we will be using it soon.
The Hierarchy is where you can find all GameObjects that are in your scene in a listed format. This tool really begins to shine when your scene starts to become quite large with multiple assets.
Highlighted in red is the Inspector. This view is mainly used when you have a GameObject selected (represented by being highlighted blue in the Hierarchy) to view and manipulate the components attached to that GameObject. In the image above, I have the “Main Camera” GameObejct selected, and the Inspector is displaying all components attached to it.
The Project window is where you can find all files stored within your “Assets” and “Packages” directories. While you have access to both, the main directory you will work in is the “Assets” directory. This directory is where your 3D models, animation clips, sound clips, shaders, scripts, and more, will live.
The tab next to the Project window is the Console window. I won’t take a screenshot of this one at is pretty bare until you actually have things running. The Console window is where you will find error messages, warning messages, as well as any debug statements you write in code.
Finally, we have the Asset Store. While this is a resource that you do not NEED to utilize, it is definitely a resource you will likely find helpful while working with Unity. The Asset Store is a marketplace filled with content from Unity and other developers. Some of the things you can find in the Asset Store are Visual Effects (VFX), animation packs, terrain creation tools and so much more. Some things are free, others have a price to them. Feel free to check out the Asset Store at any time. I would definitely recommend using it to your advantage to cover aspects of game development you are not as strong in.
Navigating the Scene View
When it comes to navigating the Scene View, there are four main commands I use. The specific commands I am about to mention are specifically for computers being used with a mouse, but a trackpad can also be used for the commands. For a more in-depth understanding of navigating the scene view, check out the documentation by Unity here.
With that said, the first command I would like to introduce you to is the Move tool. With your mouse hovering over your Scene View, hold down the middle-mouse button and you will have activated the Move tool. This tool allows you to pan in the scene view from left to right, up and down, where these directions are based on the current forward direction the Scene View camera is facing.
The next tool that is often used is the Orbit tool. This essentially lets you rotate up and down, as well as left and right, within the Scene View. To use this tool with the shortcut, hover over the Scene View and hold down the right mouse button while moving your mouse in the directions you want to rotate.
The zoom tool is another useful tool I often use. To use this one, simply scroll your middle-mouse wheel up and down to zoom in and out, respectively.
Centering the view on a GameObject
The final navigation tool I often find myself using is the Centering tool. This tool focuses your Scene View on whatever GameObject you currently have selected by focusing on that GameObject’s pivot point. To use this tool, select a GameObject either within the Hierarchy or in the Scene View and hit “F” on your keyboard.
Creating and Manipulating GameObjects
Now we’ll go over creating and manipulating GameObjects. When it comes to manipulating GameObjects, what you are doing is changing the value of certain properties for that GameObject. The properties you change will depend on the GameObject itself and the components it has. For this tutorial, I will only go into manipulating the Transform properties. Before manipulating GameObjects though, let’s create a GameObject. There are a few ways to create a GameObject in Unity. One way is to click the “+” button at the top-left corner of the Hierarchy window, as highlighted in the image below:
From the dropdown option, hover your mouse pointer over where it says “3D Objects” and then select “Cube”. You should now see a cube in your scene as I have in the image below:
Cool. Now let’s manipulate some properties of this cube. Select the cube within the Scene View or the Hierarchy. In the Inspector, you should see the cube’s Transform component. Within it, you’ll see it holds three properties — namely position, rotation, and scale. You should also see each of these properties has three inputs — one for each axis in 3D space. I recommend playing around with each of these properties to see how it changes the GameObject. Feel free to get funky with it.
Now, there are other ways to manipulate a GameObject’s Transform component. This is done through the Scene View. With a GameObject selected, hit the “W” key on your keyboard. This will bring up the tool that allows you to change the position of your selected GameObject. Click and drag along the axis you want to move your GameObject in. In my example below, I brought a piece of the wall closer to the Scene View camera.
Now, if you hit “E” on your keyboard, you will bring up the rotation tool. Similar to how the position tool worked, with the rotation tool you can use your mouse to control your GameObject’s rotation values.
Lastly, we have the scale tool, which you can activate by hitting “R” on your keyboard. Feel free to play around with all of these as you wish. One thing you should take note of is the fact that any changes made to the GameObject’s scale, rotation, and position within the Scene View are also reflected in the GameObject’s Transform component in the Inspector. At this point, you know the basics of GameObject creation and manipulation in Unity. Now let’s change the material on our wall, and call it a day with this tutorial.
Materials (with a dash of Shaders)
For those that do not know, materials are how we get our GameObjects textured, colored, and even provide some animations depending on the implementation. Well at least to some extent. At base, all materials have a shader attached to them, and it is these shaders that control a materials input and functionality. I would try to explain this more, but I honestly think Unity’s documentation for Meshes, Materials, Shaders, and Textures sums up it all up pretty well for this tutorial, so check that out if you are interested. With that, let’s create a material. In your Project window, make sure you have your “Materials” directory selected, and create a new material by clicking on the “+” button in the Project window, and selecting “Material” from the dropdown menu. Name this material whatever you want. You should now have new material and be able to see its properties in the Inspector.
In the Inspector you can see my materials automatically come with the “Universal Render Pipeline/Lit” shader due to the template I started with. The shader a material uses can be changed at any time using the drop-down menu. For this tutorial, this shader will serve our purposes. As you may have noticed in my image, I named my material red, so I will now make my material red by changing the color next to the “Base Map” property of the material. Feel free to change the color to whatever you like. Now, select a GameObject in the scene and make sure the GameObject you select has the Mesh Renderer component attached to it by checking in the Inspector. In that component, you can set a GameObject’s material under the “Material” property. Change your selected GameObject’s material to the one we just created. Your result should be something like I have shown below:
If you’ve gotten to this step, you have successfully attached your created material to a GameObject. The other way to do this is to simply drag and drop the material from the Project window onto the GameObject you want it applied to. Go back to your material now and feel free to play around with all the properties the material you created has to see how it changes things. Any changes you make will be seen in real-time in both your Scene View and Game View.
Even with the default shader that comes in the Universal Render Pipeline, you can make some interesting things. Now, you can create even cooler shaders to create procedural animations, toon/cell shaders, and other game VFX. Learning shaders is not something to be underestimated. When it comes to making your own shaders, I recommend starting with Unity ShaderGraph if you are a complete beginner. Unity also supports custom HLSL scripts for those more advanced and familiar with shaders, and these custom HLSL scripts can be used in tandem with ShaderGraph.
Awesome! You should now have Unity installed and have a pretty decent understanding of some of the main elements of Unity. Any comments and critiques are welcome, and if I made an error anywhere please let me know so I can edit it for future readers. If any points were confusing and need some clarification, let me know about that as well and I’ll take time to explain them better. Have a nice rest of your day (or evening)! Tomorrow I will be posting a tutorial on Setting Up Version Control with Git for Unity, so check for that if you are interested.