0% found this document useful (0 votes)
10 views32 pages

RAV-3. Unity

This document provides an overview of Unity, a cross-platform game engine used for creating 3D and 2D games, as well as simulations in various industries. It details the basic elements and interface of Unity, including the Project Window, Scene View, Game View, and key concepts like GameObjects, Parenting, Components, Assets, and Prefabs. The document serves as a foundational guide for students in the Interactive Communication degree program focusing on Augmented and Virtual Reality for the 2023-24 academic year.

Uploaded by

fviana72000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views32 pages

RAV-3. Unity

This document provides an overview of Unity, a cross-platform game engine used for creating 3D and 2D games, as well as simulations in various industries. It details the basic elements and interface of Unity, including the Project Window, Scene View, Game View, and key concepts like GameObjects, Parenting, Components, Assets, and Prefabs. The document serves as a foundational guide for students in the Interactive Communication degree program focusing on Augmented and Virtual Reality for the 2023-24 academic year.

Uploaded by

fviana72000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

GRAU EN COMUNICACIÓ INTERACTIVA

104760 Realitat Augmentada i Virtual

3. Unity

Joan Lleonard Ruiz Albiñana


Computer Science Departament

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
Contents
1. Introduction
2. Unity Basic Elements & Interface

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
2
1. Introduction

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
3
1. Introduction
Unity:
• Unity is a cross-platform game engine that can be used to create 3D
and 2D games and simulations such as VR or AR.
• It is used in other industries such as film, automotive, architecture,
engineering, construction and military.
• In game development Unity and Unreal are among the most popular
game engines, each with their advantages and disadvantages.
• The goal was to create an affordable game engine with professional
tools for amateur game developers while democratizeing the game
development” industry

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
4
2. Unity Basic Elements & Interface
1.Unity Interface
2.Scenes
3.GameObjects
4.Parenting
5.Components
6.Prefabs
7.Assets

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
5
2. Unity Basic Elements & Interface

Unity Interface:
• The main editor window is made up of tabbed windows which can be
rearranged, grouped, detatched and docked.

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
6
3. Unity Basic Elements & Interface
Unity Interface:

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
7
2. Unity Basic Elements & Interface
Unity Interface:
• The Project Window
• Displays your library of assets that are available to use in your
project. When you import assets into your project, they appear here.
• The left panel of the browser shows the folder structure of the project
as a hierarchical list. When a folder is selected from the list by
clicking, its contents will be shown in the panel to the right.
• The individual assets are shown in the right hand panel as icons that
indicate their type (script, material, sub-folder, etc).

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
8
2. Unity Basic Elements & Interface
Unity Interface:
• The Project Window

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
9
2. Unity Basic Elements & Interface
Unity Interface:
• The Scene View
• Is your interactive view into the world you are creating. You will use
the Scene View to select and position scenery, characters, cameras,
lights, and all other types of Game Object.
• The Scene Gizmo is in the upper-right corner of the Scene View. This
displays the Scene View Camera’s current orientation, and allows you
to quickly modify the viewing angle and projection mode.

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
10
2. Unity Basic Elements & Interface
Unity Interface:
• The Scene View

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
11
2. Unity Basic Elements & Interface
Unity Interface:
• The Game View
• The Game View is rendered from the Camera(s) in your game. It is
representative of your final, published game. You will need to use one
or more Cameras to control what the player actually sees when they
are playing your game.
• Use the buttons in the Toolbar to control the Editor Play Mode and
see how your published game plays. While in Play Mode, any
changes you make are temporary, and will be reset when you exit
Play Mode. The Editor UI darkens to remind you of this

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
12
2. Unity Basic Elements & Interface
Unity Interface:
• The Game View

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
13
2. Unity Basic Elements & Interface
Unity Interface:
• The Hierarchy Window
• The Hierarchy Window contains a list of every GameObject in the
current Scene. Some of these are direct instances of Asset files (like
3D models), and others are instances of Prefabs, which are custom
objects that make up most of your game. As objects are added and
removed in the Scene, they will appear and disappear from the
Hierarchy as well.
• Unity uses a concept called Parenting. When you create a group of
objects, the topmost object or Scene is called the “parent object”, and
all objects grouped underneath it are called “child objects” or
“children”. You can also created nested parent-child objects (called
“descendants” of the top-level parent object).

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
14
2. Unity Basic Elements & Interface
Unity Interface:
• The Hierarchy Window

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
15
2. Unity Basic Elements & Interface
Unity Interface:
• The Inspector Window
• Projects in the Unity Editor are made up of multiple GameObjects that
contain scripts, sounds, Meshes, and other graphical elements such
as Lights. The Inspector window (sometimes referred to as “the
Inspector”) displays detailed information about the currently selected
GameObject, including all attached components and their properties,
and allows you to modify the functionality of GameObjects in your
Scene.
• Use the Inspector to view and edit the properties and settings of
almost everything in the Unity Editor, including physical game items
such as GameObjects, Assets, and Materials, as well as in-Editor
settings and preferences.

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
16
2. Unity Basic Elements & Interface
Unity Interface:
• The Hierarchy Window

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
17
2. Unity Basic Elements & Interface
Scenes:
• Scenes are where you work with content in Unity. They are assets
that contain all or part of a game or application.
• Scenes can be used to create a main menu, individual levels, and
anything else. Think of each unique Scene file as a unique level. In
each Scene, you will place your environments, obstacles, and
decorations, essentially designing and building your game in pieces.
• When you create a new project and open it for the first time, Unity
opens a sample scene that contains only a Camera
and a Light.

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
18
2. Unity Basic Elements & Interface
Scenes:

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
19
2. Unity Basic Elements & Interface
Scenes:

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
20
2. Unity Basic Elements & Interface
GameObjects:
• Every object in your game is a GameObject, from characters and
collectible items to lights, cameras and special effects. However, a
GameObject can’t do anything on its own; you need to give it
properties before it can become a character, an environment, or a
special effect.
• GameObjects are the fundamental objects in Unity that represent
characters, props and scenery. They do not accomplish much in
themselves but they act as containers for Components, which
implement the functionality.

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
21
2. Unity Basic Elements & Interface
GameObjects:

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
22
2. Unity Basic Elements & Interface
Parenting:
• Parenting is one of the most important concepts to understand when
using Unity. When a GameObject is a Parent of another GameObject,
the Child GameObject will move, rotate, and scale exactly as its
Parent does. You can think of parenting as being like the relationship
between your arms and your body; whenever your body moves, your
arms also move along with it. Child objects can also have children of
their own and so on. So your hands could be regarded as “children” of
your arms and then each hand has several fingers, etc. Any object
can have multiple children, but only one parent. These multiple levels
of parent-child relationships form a Transform hierarchy. The object at
the very top of a hierarchy (ie, the only object in the hierarchy that
doesn’t have a parent) is known as the root.

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
23
2. Unity Basic Elements & Interface

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
24
2. Unity Basic Elements & Interface
Components:
• Components are the functional pieces of every GameObject.
Components contain properties which you can edit to define the
behavior of a GameObject.
• A GameObject can have many components, but every GameObject
has a Transform component. This is because the Transform dictates
the GameObject’s location, rotation, and scale. A GameObject will
always have a Transform component attached, it is not possible to
remove a Transform or to create a GameObject without one.
• The position, rotation and scale values of a Transform are measured
relative to the Transform’s parent. If the Transform has no parent, the
properties are measured in world space.

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
25
2. Unity Basic Elements & Interface
Components:
• Transform
• The Transform values in the Inspector for any child
GameObject are displayed relative to the Parent’s Transform
values. These values are referred to as local coordinates.
• For scene construction, it is usually sufficient to work with local
coordinates for child objects but in gameplay it is often useful to
find their exact position in world space or global coordinates.

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
26
2. Unity Basic Elements & Interface
Components:
• When you attach a component to a GameObject, the component’s
properties contain default values. You can edit these values in the
Editor while you build a game, or in scripts when you run the game.
• There are two main types of properties: values and references.
• You can edit value properties in the Inspector. There are various types
of values, including text, toggles and dropdowns.
• For reference properties, you can drag a file from the Project view into
the property, or use the object picker (circle icon) on the property.
Reference properties can reference other types of components,
GameObjects, or assets.
• In Play Mode, you can change properties of a component in the
Inspector. This lets you see how different values for a property affect
gameplay. This is temporary
Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
27
2. Unity Basic Elements & Interface
Components:

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
28
2. Unity Basic Elements & Interface
Assets:
• An asset is any item that you use in your Unity project to create your
game or app. Assets can represent visual or audio elements in your
project, such as 3D models, textures, sprites, sound effects, or music.
Assets can also represent more abstract items such as color
gradients, animation masks, or arbitrary text or numeric data for any
use.
• An asset might come from a file created outside of Unity, such as a
3D Model, an audio file, or an image. You can also create some types
of asset in the Unity Editor.
• Assets are located in the Project Window (vs GameObject in the
Scene)

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
29
2. Unity Basic Elements & Interface
Prefabs:
• Unity’s Prefab system allows you to create, configure, and store a
GameObject complete with all its components, property values, and
child GameObjects as a reusable Asset. The Prefab Asset acts as a
template from which you can create new Prefab instances in the
Scene.
• Any edits that you make to a Prefab Asset are automatically reflected
in the instances of that Prefab, allowing you to easily make broad
changes across your whole Project without having to repeatedly make
the same edit to every copy of the Asset.
• However, this does not mean all Prefab instances have to be
identical. You can override settings on individual prefab instances if
you want some instances of a Prefab to differ from others. You can
also create variants of Prefabs which allow you to group a set of
overrides together into a meaningful variation of a Prefab.
Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
30
2. Unity Basic Elements & Interface
Prefabs:

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
31
3. References
• Azuma R. (1997). A Survey of Augmented Reality. Presence:
Teleoperators and Virtual Environments 6, (4), 355-385.
• Azuma R., Bailot Y., Behringer R., Feiner S., Julier S., MacIntyre B.
(2001), Recent Advances in Augmented Reality, IEEE Computer Graphics
& Applications, 34-467, Nov-Dec 2001.
• Zhou F., Been-Lim Duh H., Billinghurst M. (2008), Trends in Augmented
Reality Tracking, Interaction and Display: A review of ten years of ISMAR,
7th IEEE/ACM Symposium on Mixed & Augmented Reality (ISMAR 2008),
1-10.
• Carmigniani J., Furht B., Anisetti M., Ceravolo P., Damiani E., Ivkovik M.,
(2011) Augmented reality technologies, systems and applications,
Multimedia Tools Applications,, 51:341-377.
• Birkfellner W., (2002), Augmented Reality & Computer-Aided Surgery:
from basic principles to clinical applications, Tutorial MICCAI 2002, Tokyo,
Japan.

Tema 3. Unity
Realitat Augmentada i Virtual, Curs 2023-24
Grau en Comunicació Interactiva
32

You might also like