Interface

Note

An Asset corresponds to any file or resource that is used in your project: 3D models, 2D sprite, audio file, script, shader, texture, animation.

Main windows

Standard Layout

  • In the Unity HUB, select the blank project, it will automatically open in the Unity Editor.

  • Identify the main windows of the Unity Editor:

../_images/scene.png
  • On the upper left, the Hierarchy window displays all the objects in the current scene

  • In the center, the Scene view allows us to edit and modify the current scene

  • On the right, the Inspector window lists all the information of the current selected object

  • At the bottom, in the Project window, you can find all the assets of the project displayed in two modes: on the left as a tree structure and on the right as a thumbnail view..

Restoring the Interface

While working in the interface, accidents may happen, such as closing an important window or panels disappearing. To solve such an issue, you can use the Unity Layout manager to reset windows and panels to their original positions.

  • Extend, move and close some windows randomly

  • In the top right corner of the Unity main window, find the hidden dropdown button

../_images/layout.png
  • Click on this button and select « Default »

Project/Assets windows

Starting a New Scene

Avertissement

Unity developers generally create a separate folder for each type of element: a folder named Scripts for all the game’s scripts, a folder named Textures for all textures, and so on. For our needs, it is simpler to create one folder per project and store all the project assets within it.

  • In the Project window, select the folder named Assets > Scenes

../_images/psce.png
  • In the Assets window, in an empty area of the thumbnail view, right click to open the context menu

../_images/createFolder.png
  • Select Create > folder

  • Name this folder Intro

../_images/intro.png
  • Double-click on the Intro folder to open it

../_images/empty.png
  • Right click to open the context menu

    • Select Create > Scene > Scene

    • Name it: IntroScene

../_images/introscene.png
  • Double click on the scene icon to open it

  • In the Hierarchy window, check that the name at the top of the hierarchy matches the name of your file:

../_images/hierar.png

Hierarchy window

Creating objets

Basic 3D objects can be created through this window:

  • In the Hierarchy window, right click in an empty area to open the context menu

../_images/create3D.png
  • Select 3D object > Cube

  • In the assets window, select the folder Assets > SolidColorMaterials

  • Choose a color

  • Drag and drop this material onto the cube in the 3D scene

../_images/apply1.gif

Hierarchy window

../_images/cube.png
  • Notice that the cube has been added to the tree

  • Select this item in the Hierarchy

  • Press F2 and rename the object to « MyCube »

Inspector

In the Unity engine, an object in the scene is called a GameObject. It is described as a list of components such as Transforms, Renderers, Colliders, and Scripts, which together define its behavior and appearance in the game.

  • Select « MyCube » in the Hierarchy window

The Inspector windows is organized as a stack of dropdown boxes, thus you can find:

  • At the top:

    ../_images/ins1.png
    • The name of the object: « MyCube »

    • A checkbox to enable or disable the object in the scene

      • Check and uncheck the checkbox to disable and reactivate the cube

    • A tag: using this tag, you can gather objects by category, like enemy or walls, for example

  • Transform

    ../_images/transform.png
    • A transformation matrix that defines the translation, rotation and scale values relative to the parent object

  • Mesh filter: defines the 3D geometry

  • Mesh renderer: rendering information like material, shadows…

  • Collider: a geometric object that encloses the object and that is used to detect collisions with other objects while minimizing computations