0% found this document useful (0 votes)
77 views

1.1 - Introduction To Unity

The document provides an introduction to the Unity game engine, including its capabilities, interface, and basic concepts like scenes, gameobjects, and components.

Uploaded by

talavyfc1234
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

1.1 - Introduction To Unity

The document provides an introduction to the Unity game engine, including its capabilities, interface, and basic concepts like scenes, gameobjects, and components.

Uploaded by

talavyfc1234
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Introduction to Unity

GAME PROGRAMMING
C# PROGRAMMING AND UNITY

TRINH THI NGOC LINH

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

Unity C# Animations & Physics Final


Physics Engine Project
Introduction C# programming
L0.1 in Unity system
LO.2 LO.3 LO.4 LO.6

C# in Unity Physics Engine


- How to use C# in Unity
- Rigidbody
- C# script and other
- Collisions & Triggers
component of GameObject
- Scoring Systems
- I/O interaction
Game
 Game is a structured form of play, usually undertaken
for entertainment or fun, and sometimes used as an educational tool.
Many games are also considered to be work or art
 Games can take many forms, including physical activities, board
games, card games, video games, sports…
 They can be played alone, in teams, offline or online; by amateurs or
by professionals
 Key components of games are goals, rules, challenge, and
interaction

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

• (B) The Hierarchy window is a


hierarchical text representation of
every GameObject in the Scene

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

• (D) The Scene view allows you to


visually navigate and edit your
Scene. The Scene view can display
a 3D or 2D perspective, depending
on the type of Project you are
working on
15
Unity IDE Interface
• (E) Overlays contain the basic tools for
manipulating the Scene view and the
GameObjects within it

• (F) The Inspector window allows you to


view and edit all the properties of the
currently selected GameObject

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

The Scene View - Unity Official Tutorials https://www.youtube.com/watch?v=fxJR2pHPyTQ


20
Game View

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

Or you can click on the Layout


Options button at the top right of
each tab and choose Add Tab, to
add a new panel
31
Unity's Scripting Integration
 Unity is deeply integrated with various scripting languages, with C#
being the primary language used for scripting game logic within the
Unity ecosystem
 Scripts in Unity play a pivotal role in adding interactivity to game objects.
 These scripts define the behavior, interactions, and logic behind various
game elements, making them dynamic and responsive to player input or
events

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/

 Unity Asset Store


https://assetstore.unity.com/
34
Asset Store
• The Asset Store is an online
marketplace where developers can
find, buy, and sell digital assets and
resources to use in their Unity
projects
• It is an integral part of the Unity
ecosystem and offers a wide range of
content, including 3D models, 2D
sprites, textures, animations, audio
files, scripts, tools…

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

You might also like