Unity Tutorials 2 - Unity Basics I - Starting A New Project
Unity Tutorials 2 - Unity Basics I - Starting A New Project
Opening Unity
Double click on the desktop shortcut or find Unity in the start menu.
You can click either of the buttons shown above to create a new project.
Unity Tutorials 2 – Unity Basics
Choose a name for your project and select where you want to save it to. You can click
the ellipses shown above to search for a place to save it. Just click on the location (it will
become highlighted) and click “Select Folder”.
Project: A Unity project consists
This tutorial will assume that you have your of a folder that contains all of the
project saved on your desktop. parts of your project, i.e. the game
that you are working on.
Once you are ready, make sure that 3D is
selected (it will be highlighted pink) and click
“Create Project.” 3D and 2D Modes: The view
mode that you are working in. This
can be toggled at any time, but
choosing 3D while making a new
project will grant you settings that
choosing 2D will not, such as a
default skybox.
Windows
Unity's interface is divided into windows. Below is the default layout that we will be
using.
Windows can be resized by hovering over the edges, clicking, and dragging.
You can slide (known as “pan”) around your scene using First-Person: When the
the hand tool, which is selected by default. camera sees what the
controlled character sees,
as if the camera is their
eyes.
Simply use the LMB to use whichever of these five tools
you have selected. Third-Person: When the
For example, select the hand tool and click and drag camera shows a
around the scene. You will be able to slide the perspective perspective separate from
around 2-dimensionally. Holding the ALT key will allow the controlled character's.
you to perform a different function when using the LMB.
Instead of panning you will be able to rotate the
perspective. Holding the RMB will perform this same Translate: Add to or
function. subtract from an object's
position.
Holding the RMB also has another function. While
holding the RMB in the scene, you can use the W, A, S,
and D keys to fly around in the scene in a first-person Rotate: Change the
perspective. Let go of the RMB to stop. You can also direction an object is
hold SHIFT to move faster. facing.
Let's try the tool next to the hand tool: the move tool. The move tool is used to translate
objects around the scene. Try clicking and dragging over the Main Camera object to
select it. You can also simply click on the object, though this is sometimes hard to do.
You will now see three arrows within the object. These represent the three axes of third-
dimensional space. The red arrow is the X-axis and represents left and right or width, the
blue arrow is the Z-axis and represents inwards and outwards or length, and the green
arrow is the Y-axis and represents up and down or height. Click on an arrow to select it
and it will turn yellow. You can now click and drag this arrow to translate the object's
position on this axis.
Note: When creating a 3D model, it is good practice to have the object facing up the Z-
axis. This way, when looking at a model from a 2D perspective, it will be facing straight
towards the camera.
The next tool is the rotate tool. Select the rotate tool and the camera. Instead of arrows
you will be shown rings. The concepts here are still the same. Click a ring to select it
then click and drag to rotate an object around that axis. Think of each axis as an
immobile pole going through the object. Let's say you want to rotate something along
the Y-axis. Since the Y-axis is up and down, the pole would be straight down through the
top of the object. Since the pole itself can't move, the object will only rotate left and
right. Looking at the picture below, you can see how the object looks if you rotate it to
the right along the Y-axis.
Unity Tutorials 2 – Unity Basics
Try rotating the camera along the X-axis until it's pointing up or down. Then, switch to
the Game View. You can see how transforming the camera affects the view.
Hierarchy
The hierarchy lists all objects that are in the scene. You can click on an object in the
hierarchy to select it in the scene view or double click to fly straight to that object. This
is useful if you get lost in the scene. Try zooming out really far then double click on the
Main Camera.
Inspector
The inspector is used to make changes to the selected object. If you select the Main
Camera object you can see a Transform menu at the top. You can type in values here to
change an object's position, rotation, and scale manually without using the scene tools.
This is useful for obtaining an exact position, such as (0, 0, 0).
Unity Tutorials 2 – Unity Basics
Assets
Assets are all of the external resources used to create your game. Backgrounds, character
models, scripts, and sounds are all assets. Any asset in the Assets folder of your project
will be found in the Assets window. Let's try importing an asset into your project.
Open up an image editing program, such as Paint, and draw something. Save it to your
desktop.
Unity Tutorials 2 – Unity Basics
Click on “Import New Asset” and find the picture you made. With it selected, click
“Import”. Your asset will appear in the Assets window. If you check the Assets folder in
your project folder you will be able to find a copy of the asset there.
Unity Tutorials 2 – Unity Basics
Note: The contents of the Assets window is entirely dependant on the Assets folder in
your project folder. Any changes made to his folder and its contents will be immediately
applied to your project.
Now try making an object in your scene using this asset. First, imported .png files are
typically textures by default. A texture cannot be directly imported into a scene as an
object. Select your image asset and look to the inspector window. Change the texture
type to Sprite and click “Apply”.
Now click and drag this asset into either the hierarchy or the scene view.
Unity Tutorials 2 – Unity Basics
You now have a new game object created from an asset. If you dragged the asset into the
hierarchy you can notice that its transform will be at the default values. If you dragged it
into the scene view it will be placed approximately where you dropped it.
Unity Tutorials 2 – Unity Basics
III – Saving a Scene
Most aspects of a project are saved as soon as changes are applied. Scenes however are
not saved automatically. To save your current scene, go to file and select “Save Scene”
or press CTRL and S.
Unity Tutorials 2 – Unity Basics
The Assets folder should open by default. If it does not then navigate to it before saving.
You should now see your scene in the assets window. You can double-click on any scene
in the assets window to open that scene.
WARNING: Make sure to save your scene often to avoid data loss. The easiest way is to
press CTRL and S after every big change.
Unity Tutorials 2 – Unity Basics
IV – Opening an Existing Project
Whenever you open Unity you will be shown a list of existing projects. You can open an
existing project simply by clicking it in the list or by clicking open and navigating to
your project.
Click on the appropriate folder and click “Select Folder”. Unity will open to the most
recently saved scene.
Unity Tutorials 2 – Unity Basics
The “5.3.4” found beside the project name is the version that this project was created
using. Please be aware that using a different version of Unity may cause compatibility
issue.
Q: Hand tool
W: Move tool
E: Rotate tool
R: Scale tool
T: Rect tool