[Introduction to Unity] The basics of Scenes

In this article, I will show how to use ‘Scene’ and create primitive objects, which are the basics of Unity.

Specifically, I will explain the followings:

  • The main windows
  • Primitive objects available in Unity
  • How to translate, rotate, scale objects
  • What is ‘Material’ in Unity?
  • How to set up a material and colour a 3D model

If you are new to Unity, refer to the following article to learn how to install Unity and create a project.

Once you create a project, the screen will be divided into some windows, which are Unity’s editor windows.

You will render 3D objects by using those editor windows.

Please remember the name of each window as they are referred to frequently from now.

The basic configuration of editor windows

1. The Hierarchy window

The Hierarchy window

By default, it is placed at the top left of the screen.

It’s the window where you can organize and display the files and folders used for the project.

You don’t need to focus on the details for now.

2. The Scene view / The Game view / Asset Store

The Scene view / The Game view / Asset Store

The Scene view displays ‘game’ scenes.

In this view, you can actually place components and operate them.

The Game view displays the view from the camera in the game.

The difference between the Scene view and the Game view.

‘Asset Store’ stocks 3D models required to create Scenes with Unity.

This article doesn’t cover how to use the Unity Asset Store, but please refer to the following article to learn more about the Unity Asset Store if you are interested in.

3. The Project view / The Console window

The Project view / The Console window

When making a Scene, you need to create a project.

The project includes the files to create a Scene.

In the Project view, you organize and manage the files of the project. You are going to create a Scene by opening and modifying various files in the Project view.

The Console window displays errors when the project is running.

The Console window is checked frequently when writing codes, but you don’t need to do that much for now. So just remember there is such a window.

4. The Inspector window

The Inspector window

You can manage various information about the selected file in the Inspector window.

Click a component in the Scene view to display its information in the Inspect view.

You can also change the settings of the component in the Inspector window.

How to use the Inspector window

The Inspector window is frequently used from early stages, so let’s learn how to use it.

Create a cube

I will show how to use the Inspector window while making a basic object.

Right-click on the Hierarchy windows and select ‘3D Object > Cube’.

Right-click on the Hierarchy window

A cube named ‘Cube’ has been created in the Scene view.

Place a cube in the Scene view

Transform

Select ‘Cube’ in the Hierarchy window to display the information about it in the Inspector window.

Check the information in the Inspector

There is an item called ‘Transform’ at the top of the Inspector.

You can adjust the position and scale of the model with this ‘Transform’ component.

Transform

I explain three items in the ‘Transform’ component.

Position

‘Position’ defines the position of the model. By default, it’s been set to (0, 0, 0).

Position

There are grid lines in the Scene view. To put it simply, the origin of those grid lines is (0, 0, 0).

‘X’ and ‘Y’ correspond to the lateral and longitudinal direction and ‘Z’ corresponds to the depth.

The X, Y and Z-axis

Rotation

‘Rotation’ defines the angle of the model. By default, it’s been set to (0, 0, 0).

Rotation

The unit of those values is ‘degree’. For example, enter 90 for ‘X’ if you want to rotate the model around the X-axis by 90 degrees.

Scale

‘Scale’ defines the scale of the model. By default, it’s been set to (0, 0, 0).

Scale

If you want to keep the size ratio constant, you need to keep all the values the same. However, you can also scale the model in a specific direction by changing individual value.

Various primitive objects

In addition to ‘Cube’, there are various primitives available in Unity.

Let’s see what kind of primitives are available so that you can use them when creating a Scene in the future.

As with ‘Cube’,  right-click on the Hierarchy window and select ‘3D Object’ to create a primitive.

Create a primitives

You can operate each primitive and set up the parameters in the same way as ‘Cube’, so you don’t need to test each primitive here.

Just remember there are such primitives available.

Sphere

It’s a sphere with a constant radius. You can create an ellipsoid by varying Scale values in ‘Transform’.

Sphere

Cylinder

‘Cylinder’ is used as frequently as Cube and Sphere.

Cylinder

Capsule

‘Capsule’ is not used so often as Cube, Sphere or Cylinder.

You can make a capsule-like object by combining Spheres and a Cylinder, but you can easily make it by using this Capsule primitive. 

Capsule

Plane

‘Plane’ is used to create a 2D object such as floor, ground.

Unlike ‘Cube’, ‘Plane’ has no thickness, it will remain thin no matter how much you increase the Y value. Therefore, use ‘Cube’ if you want to make a flat object with a thickness.

Plane

Material

All the models I showed so far are ‘colourless’, being displayed in grey.

When creating a Scene, it wouldn’t be practical to leave all the models grey because, in many cases, you want to colour, put patterns, change textures, add irregularities and etc.

‘Material’ determines ‘how the model looks’ by defining the surface.

Now, let’s create a material.

In the Project view, right-click on the Assets folder and select ‘Create > Material’.

Create a material

It creates a Material file. Rename it ‘Red’.

Change the file name

Once you select the Material file, the information about the material will be displayed in the Inspector window

In the Inspector, you find ‘Albedo’ set to white. It is where you can set the colour of the surface.

Click the colour box.

Select ‘Albedo’

It brings up the colour picker.

Select a red colour, then the material file changes from grey to red.

Change the colour

Apply the material file to the model in the Scene view by dragging and dropping it.

Apply the material to a Sphere

Now you have applied the ‘Albedo’ colour to the model.

There are two parameters under the Albedo in the Inspector window: ‘Metallic’ and ‘Smoothness’.

The Metallic parameter determines how ‘metal-like’ the surface is.

It has a slider on the right, so you can increase the reflectivity by moving it to the right (You can also enter the value directly).

‘Smoothness’ makes the reflection clearer.

It makes the object mirror things around, so move the slider to the right if you want a realistic view by mirroring the objects around it.

‘Metallic’ and ‘Smoothness’

A sphere with the Metallic and Smoothness parameter increased