SlideShare a Scribd company logo
UNITY
TUTORIAL
By- Akshat Singh
20BCG10017
What Is 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 UI Text
 The UI text element displays a non-interactive piece of text to the user. Text elements can be
used to provide captions or labels for other GUI controls or to display instructions or other
text. For example printing the current score of the player to the screen requires the numeric
value of the score to be converted to a string, generally through the .toString() method,
before it is displayed.
STEPS TO FOLLOW:-
 STEP 1- To insert a Text UI element in Unity, right-click on the Scene
Hierarchy, then select Game Object -> UI -> Text.
STEPS TO FOLLOW:-
 STEP 2- A new Text element should show up in your
Canvas region. If we have a look at its properties, we
will see some very useful options.
Properties-
To change the font of the text, you must first import
the font file from your computer into Unity, as an Asset.
We can also accept the Text element through the
scripting; this is where the importance of dynamic UI
comes in.
STEPS TO FOLLOW:-
 STEP 3-Instead of the console, which is printing how many times the button has been pressed
let's print it out on the game screen trough the Text element.
CODE:-
1. using System.Collections;
2. using System.Collections.Generic;
3. using UnityEngine;
4.
5. public class ButtonAction : MonoBehaviour
6. {
7. int n;
8. public Text myText;
9. public void OnButtonPress(){
10. n++;
11. myText.text = "Button clicked " + n + " times.";
12. }
13. }
STEPS TO FOLLOW:-
 STEP 4- Create a public Text variable, where we can drag and
drop our Text UI element. Save your script and go to the
ButtonGameObject, and you will now see the new slot for the
Text UI element. Drag and drop your Text Game Object on to
the slot.
STEPS TO FOLLOW:-
 STEP 5- When we save our script, we will now see a new slot for the Text UI element in
our Button Manager. Simply drag and drop the game Object containing that Text
element onto the slot, and hit the Play button.
THANK YOU

More Related Content

What's hot (20)

PPTX
Windows Phone Game Development in Unity
Vardan Meliksetyan
 
PPTX
Unity 5 Overview
Shahed Chowdhuri
 
PDF
Unity - game engine u RIA svijetu PDF
Danko Kozar
 
PPTX
Sprinter
Himanshu Chablani
 
PDF
Unity L01 - Game Development
Mohammad Shaker
 
PPTX
Why unity 3 d is chosen
Red Apple Technologies
 
PPTX
Unity Game Engine - Basics
FirosK2
 
DOCX
Top rated games specially 3 d games
unity3dgames123
 
PPTX
Lecture 3 INTRODUCTION TO COMPUTER
Sultan Omar Shige
 
PPTX
ICT BTEC UNIT 2 M1
OriginalGSM
 
PPTX
Android Game Minisyonize
savvy
 
PPTX
01 unity 3_d_introduction
Reham Maher El-Safarini
 
PPTX
Introduction to windows
Garmian
 
PPTX
Windows 7
ankur bhalla
 
PPTX
Windows 8 ppt
Shan Singhai
 
PPTX
Game Development with Unity3D 5 in Bandung, Indonesia
Harum Nugroho
 
PPT
Introduction to Microsoft Windows
TimesRide
 
PDF
Introduction to android (and mobile) game development
Ruslan Novikov
 
PDF
clusterのVRUIをリニューアルした話
shohashimoto4
 
Windows Phone Game Development in Unity
Vardan Meliksetyan
 
Unity 5 Overview
Shahed Chowdhuri
 
Unity - game engine u RIA svijetu PDF
Danko Kozar
 
Unity L01 - Game Development
Mohammad Shaker
 
Why unity 3 d is chosen
Red Apple Technologies
 
Unity Game Engine - Basics
FirosK2
 
Top rated games specially 3 d games
unity3dgames123
 
Lecture 3 INTRODUCTION TO COMPUTER
Sultan Omar Shige
 
ICT BTEC UNIT 2 M1
OriginalGSM
 
Android Game Minisyonize
savvy
 
01 unity 3_d_introduction
Reham Maher El-Safarini
 
Introduction to windows
Garmian
 
Windows 7
ankur bhalla
 
Windows 8 ppt
Shan Singhai
 
Game Development with Unity3D 5 in Bandung, Indonesia
Harum Nugroho
 
Introduction to Microsoft Windows
TimesRide
 
Introduction to android (and mobile) game development
Ruslan Novikov
 
clusterのVRUIをリニューアルした話
shohashimoto4
 

Similar to Unity tutorial (20)

PDF
Game UI Development_1
Felipe Ramos
 
PDF
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
Kobkrit Viriyayudhakorn
 
PDF
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Kobkrit Viriyayudhakorn
 
PDF
STUDY OF AN APPLICATION DEVELOPMENT ENVIRONMENT BASED ON UNITY GAME ENGINE
AIRCC Publishing Corporation
 
PDF
Unity Tutorial_Highlighted Notes.pdf
Arumugam90
 
PPTX
Text101 Game in Unity3D
CompleteUnityDeveloper
 
PDF
DSC RNGPIT - Getting Started with Game Development Day 1
DeepMevada1
 
PDF
course1-Intrduction-to-the-game-industry.pdf
BoubakerMedanas
 
PPTX
Unity - Essentials of Programming in Unity
NexusEdgesupport
 
PPTX
Unity Game Engine Presentation for ICT..
MerryGoldCuestas
 
PPTX
Cmd unity withc
umairnoora
 
PPTX
Unity3 d uitools
DotNetCampus
 
PPTX
INTERFACCE GRAFICHE CON UNITY3D 4.6: IL GIOCO NON BASTA!
DotNetCampus
 
PDF
Unity introduction for programmers
Noam Gat
 
PPTX
Unity 3d Basics
Chaudhry Talha Waseem
 
PDF
The Basics of Unity - The Game Engine
OrisysIndia
 
PPTX
Game Development with Unity - by Mickey MacDonald
Canada's Technology Triangle .NET User Group
 
PDF
AI For Gaming lecture2 Unity and c# basics.pdf
YetundeLongeFolajimi
 
PPTX
unity gaming programing basics for students ppt
KathiriyaParthiv
 
PPTX
Workingwithunity 110519054824-phpapp01
Srijib Roy
 
Game UI Development_1
Felipe Ramos
 
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
Kobkrit Viriyayudhakorn
 
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Kobkrit Viriyayudhakorn
 
STUDY OF AN APPLICATION DEVELOPMENT ENVIRONMENT BASED ON UNITY GAME ENGINE
AIRCC Publishing Corporation
 
Unity Tutorial_Highlighted Notes.pdf
Arumugam90
 
Text101 Game in Unity3D
CompleteUnityDeveloper
 
DSC RNGPIT - Getting Started with Game Development Day 1
DeepMevada1
 
course1-Intrduction-to-the-game-industry.pdf
BoubakerMedanas
 
Unity - Essentials of Programming in Unity
NexusEdgesupport
 
Unity Game Engine Presentation for ICT..
MerryGoldCuestas
 
Cmd unity withc
umairnoora
 
Unity3 d uitools
DotNetCampus
 
INTERFACCE GRAFICHE CON UNITY3D 4.6: IL GIOCO NON BASTA!
DotNetCampus
 
Unity introduction for programmers
Noam Gat
 
Unity 3d Basics
Chaudhry Talha Waseem
 
The Basics of Unity - The Game Engine
OrisysIndia
 
Game Development with Unity - by Mickey MacDonald
Canada's Technology Triangle .NET User Group
 
AI For Gaming lecture2 Unity and c# basics.pdf
YetundeLongeFolajimi
 
unity gaming programing basics for students ppt
KathiriyaParthiv
 
Workingwithunity 110519054824-phpapp01
Srijib Roy
 
Ad

Recently uploaded (20)

PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
PPTX
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
PDF
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PPTX
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Human Resources Information System (HRIS)
Amity University, Patna
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
Tally software_Introduction_Presentation
AditiBansal54083
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Ad

Unity tutorial

  • 2. What Is 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.
  • 3. Unity UI Text  The UI text element displays a non-interactive piece of text to the user. Text elements can be used to provide captions or labels for other GUI controls or to display instructions or other text. For example printing the current score of the player to the screen requires the numeric value of the score to be converted to a string, generally through the .toString() method, before it is displayed.
  • 4. STEPS TO FOLLOW:-  STEP 1- To insert a Text UI element in Unity, right-click on the Scene Hierarchy, then select Game Object -> UI -> Text.
  • 5. STEPS TO FOLLOW:-  STEP 2- A new Text element should show up in your Canvas region. If we have a look at its properties, we will see some very useful options. Properties- To change the font of the text, you must first import the font file from your computer into Unity, as an Asset. We can also accept the Text element through the scripting; this is where the importance of dynamic UI comes in.
  • 6. STEPS TO FOLLOW:-  STEP 3-Instead of the console, which is printing how many times the button has been pressed let's print it out on the game screen trough the Text element. CODE:- 1. using System.Collections; 2. using System.Collections.Generic; 3. using UnityEngine; 4. 5. public class ButtonAction : MonoBehaviour 6. { 7. int n; 8. public Text myText; 9. public void OnButtonPress(){ 10. n++; 11. myText.text = "Button clicked " + n + " times."; 12. } 13. }
  • 7. STEPS TO FOLLOW:-  STEP 4- Create a public Text variable, where we can drag and drop our Text UI element. Save your script and go to the ButtonGameObject, and you will now see the new slot for the Text UI element. Drag and drop your Text Game Object on to the slot.
  • 8. STEPS TO FOLLOW:-  STEP 5- When we save our script, we will now see a new slot for the Text UI element in our Button Manager. Simply drag and drop the game Object containing that Text element onto the slot, and hit the Play button.