1.1 - Introduction To Unity
1.1 - Introduction To Unity
GAME PROGRAMMING
C# PROGRAMMING AND UNITY
1
What you will learn in this Course
Implement
Basic Animation & Physics - Applying Scripting and Physics
- Working with Unity - Animation Scripting and Interactions - Implementing Animations and
- GameObject and - UI Design UI
basic components - UI Systems - Debugging and
Troubleshooting
3
Video game
Video games are interactive electronic
games played on various devices, including
computers, gaming consoles, smartphones,
tablets, and handheld gaming devices
They are a form of digital entertainment
that allows players to engage with virtual
worlds, characters, and challenges through
input devices like keyboards, mice,
controllers, or touchscreens
4
Game engine
A software framework or platform designed to create and develop
video games
It provides developers with a set of tools, libraries, and functionalities
that simplify and expedite the game development process
Some popular game engines:
Unity
Unreal Engine
Godot Engine
CryEngine
Lumberyard
…
5
Game engine
The most popular game engines contain some or all of the following
functionality:
Graphics rendering engine, supporting 2D or 3D graphics
Physics engine that supports collision detection
Audio engine to load and play sounds and music files
Scripting support to implement gameplay logic
World object model defining the contents and properties of the game world
Animation handling to load animation frames and play them
6
Game engine
The most popular game engines contain some or all of the following
functionality:
Networking code to allow for multiplayer, downloadable content, and
leaderboards
Multithreading to allow game logic to execute simultaneously
Memory management because no computer has unlimited memory
Artificial intelligence for pathfinding and computer opponents
7
Introduction to Unity
• Using of Unity
• Game development
• Interactive Experiences
• Previsualization for Film
• Architectural Visualization
• Animation
• Simulations
8
Introduction to Unity
• Unity is a cross-platform game engine initially released by Unity Technologies, in
2005. The focus of Unity lies in the development of both 2D and 3D games and
interactive content
• Unity now supports over 20 different target platforms for deploying, while its most
popular platforms are the PC, Android and iOS systems
• Unity features a complete toolkit for designing and building games, including
interfaces for graphics, audio, and level-building tools, requiring minimal use of
external programs to work on projects
9
Cross-Platform Capabilities
Unity's cross-platform capabilities empower developers to create games and
applications that can seamlessly run on multiple platforms, including mobile devices
(iOS, Android), consoles, desktops (Windows, macOS), web browsers, AR/VR
devices, and more
10
Installation
Download Unity Hub:
https://unity.com/download
Install Unity Hub
Run Unity Hub
Create account / Sign in
Install / Choose Unity Editor:
Visual Studio 2019 or later
https://www.tutorialspoint.com/unity/unity_installation_and_s
etting_up.htm
11
Installation
12
Unity IDE Interface
13
Unity IDE Interface
• (A) The Toolbar provides access to
your Unity Account and Unity Cloud
Services. It also contains controls for
Play mode; Undo history; Unity
Search; a layer visibility menu; and the
Editor layout menu
14
Unity IDE Interface
• (C) The Game view simulates what
your final rendered game will look
like through your Scene Cameras.
When you click the Play button, the
simulation begins
16
Scene View
17
Scene View
• The Scene view is where you visualize and interact with the world you create in the
Editor
• In the Scene view, you can select, manipulate, and modify GameObjects that act
as scenery, characters, cameras, lights, and more
18
Scene View Navigation
19
Scene View Navigation
Scene View navigation tutorial video
21
Game View
22
Game View
23
Game View
The Game View - Unity Official Tutorials
https://www.youtube.com/watch?v=w7RLUM9TBXY
24
Hierarchy View
Hierarchy lists the name of every object in the scene
and nests the names together according to their
hierarchy linkages in the scene
Basically, it’s a way of selecting objects by name
instead of hunting them down and clicking them within
the Scene view
The Hierarchy linkages group objects together visually,
like folders, allowing you to move the entire group as
one
25
Inspector Panel
The Inspector shows you information
about the currently selected object
Select an object, and the Inspector is then
filled with information about that object.
The information shown is pretty much a list
of components, and you can even attach
or remove components from objects
26
The Toolbar
You can find the
Toolbar at the top of
the Unity Editor
It is not a window, and
is the only part of the
Unity interface that
you can’t rearrange
27
The Project and Console tabs
Project shows all the assets (art, code, and so on) in the project. Specifically, on
the left side of the view is a listing of the project’s directories; when you select a
directory, the right side of the view shows the individual files in that directory
Project shows files that may not be contained within any specific scene
28
The Project and Console tabs
The Console tab is the place where messages from the code show up
Some of these messages will be debugging output that you placed deliberately,
but Unity also emits error messages if it encounters problems in the script you
wrote
29
Customizing your workspace
You can customize your Layout of Views by click-dragging the Tab of any View to
one of several locations
Dropping a Tab in the Tab Area of an existing window will add the Tab beside any
existing Tabs. Alternatively, dropping a Tab in any Dock Zone will add the View in
a new window
30
Customizing your workspace
If you can't find a panel on the
layout, you can reopen it by going
to the Window > General, and
then choosing the panel you want
to add
32
Unity's Scripting Integration
Scripts act as the backbone
for game interactivity,
enabling developers to define
how game elements behave
and respond in different
situations or conditions
33
Unity Community and Support
Unity Community
Forum: https://forum.unity.com/
Discussions: https://discussions.unity.com/
Community: https://unity.com/community
Unity Manual
https://docs.unity3d.com/ (*)
https://learn.unity.com/
https://assetstore.unity.com/
35
Adding an asset from the Unity Asset Store to project
• In top menu: Select Window -> Asset
Store
• Click Search online, go to website:
https://assetstore.unity.com/
• Log in to your Unity account
• Search for assets
• Click Buy Now / Add to My Assets
button
36
Adding an asset from the Unity Asset Store to project
• Click Open Package
Manager
• Select Package from
My Assets
• Click Download
37
Adding an asset from the Unity Asset Store to project
• Click Import to import assets
from My assets to project
38
Practice
• Install tools
https://unity.com/download
• Review Unity’s Interface
• Watch video about Scene view:
https://www.youtube.com/watch?v=fxJR2pHPyTQ
• Watch video about Game view
https://www.youtube.com/watch?v=w7RLUM9TBXY
• Use Unity Asset store
https://assetstore.unity.com/
39