SlideShare a Scribd company logo
LECTURE 6:
INTRODUCTION TO UNITY
Mark Billinghurst
mark.billinghurst@unisa.edu.au
Zi Siang See
zisiang@reina.com.my
November 29th-30th 2015
Mobile-Based Augmented Reality Development
Mobile AR Lecture6 - Introduction to Unity 3D
Unity 3D Game Editor
What You Need to Learn
•  Camera
•  Scene View (trans, rot, scale)/Game View
•  Position Objects
•  Load Assets
•  Scripting – C#
•  Inspector/Component Properties
•  Assemble Scene
•  Loading primitive objects
•  Easy Materials – creating solid colour/texture
•  Lights
SETUP
Download and Install
•  Go to unity3d.com/download
•  Use Download Assistant – pick components you want
Getting Started
•  First time running Unity you’ll be asked to create a project
•  Specify project name and location
•  Can pick asset packages (pre-made content)
Unity Interface
•  Toolbar, Scene, Hierarchy, Project, Inspector
Customizable Interface
Building Scenes
• Use GameObjects:
•  Containers that hold different components
•  Eg 3D model, texture, animation
• Use Inspector
•  View and edit object properties and other settings
• Use Scene View
•  Position objects, camera, lights, other GameObjects etc
• Scripting
•  Adding interaction, user input, events, etc
GameObjects
•  Every object in Scene is a GameObject
•  GameObjects contain Components
•  Eg Transform Component, Camera Component
Adding 3D Content
•  Create 3D asset using modeling package, or download
•  Fbx, Obj file format for 3D models
•  Add file to Assets folder in Project
•  When project opened 3D model added to Project View
•  Drag mesh from Project View into Hierarchy or Scene View
•  Creates a game object
Positioning/Scaling Objects
•  Click on object and choose transform
UNITY BASICS
Making a Simple Scene
1.  Create New Project
2.  Create Game Object
3.  Moving main camera position
4.  Adding lights
5.  Adding more objects
6.  Adding physics
7.  Changing object materials
8.  Adding script behaviour
CreateProject
•  Create new folder and project
New Empty Project
Create GameObject
•  Load a Sphere into the scene
•  GameObject -> 3D Object -> Sphere
Moving main camera
•  Select Main Camera
•  Select translate icon
•  Move camera
Add Light
•  GameObject -> Light -> Directional Light
•  Use inspector to modify light properties (colour, intensity)
Add Physics
•  Select Sphere
•  Add Rigidbody component
•  Add Component -> RigidBody or Component -> Physics -> RigidBody
•  Modify inspector properties (mass, drag, etc)
Add More Objects
•  Add several cubes
•  GameObject -> 3D Object – Cube
•  Move cube
•  Add Rigid Body component (uncheck gravity)
Add Material
•  Assets -> Create -> Material
•  Click Albedo colour box in inspector
•  Select colour
•  Drag asset onto object to apply
Add Script
•  Assets -> Create -> C# script
•  Edit script using Mono
•  Drag script onto Game Object
Example C# Script
GameObject Rotation
using UnityEngine;

using System.Collections;



public class spin : MonoBehaviour {



    // Use this for initialization

    void Start () {

    

    }

    

    // Update is called once per frame

    void Update () {

        this.gameObject.transform.Rotate(Vector3.up*10);

    }

}

#
Scripting C# Unity 3D
•  void Awake():
•  Is called when the first scene is loaded and the game object is active
•  void Start():
•  Called on first frame update
•  void FixedUpdate():
•  Called before physics calculations are made
•  void Update():
•  Called every frame before rendering
•  void LateUpdate():
•  Once per frame after update finished
Final Spinning Cube Scene
More Spinning
using UnityEngine;
using System.Collections;
public class Spin : MonoBehaviour {
public float speed = 10;
// Update is called once per frame
void Update () {
transform.Rotate (Vector3.up, speed * Time.deltaTime);
}
}
Tanks Demo
•  Explore scripts, assets, objects
Resources
• Unity Main site
• http://www.unity3d.com/
• Holistic Development with Unity
• http://holistic3d.com
• Official Unity Tutorials
• http://unity3d.com/learn/tutorials
• Unity Coder Blog
• http://unitycoder.com

More Related Content

What's hot (20)

PPTX
Unity - Game Engine
Geeks Anonymes
 
PPTX
Unity 3D game engine seminar
NikhilThorat15
 
PPTX
Unity 3D, A game engine
Md. Irteza rahman Masud
 
PPTX
unity basics
Reham Maher El-Safarini
 
PPTX
Game Architecture and Programming
Sumit Jain
 
PDF
Introduction to AR with Unity3D
Andreas Blick
 
PPSX
An Introduction To Game development
Ahmed
 
PPT
What Is A Game Engine
Seth Sivak
 
PPT
Introduction to Unity3D Game Engine
Mohsen Mirhoseini
 
PDF
Unity
Khaled Ismail
 
PDF
Unity Introduction
Juwal Bose
 
PDF
Android Application And Unity3D Game Documentation
Sneh Raval
 
PDF
Unreal Engine Basics 01 - Game Framework
Nick Pruehs
 
PPTX
Introduction to Game Development
Shaan Alam
 
PPSX
blender animation software
Aayushi Jain
 
PDF
2022 COMP4010 Lecture1: Introduction to XR
Mark Billinghurst
 
PDF
Unity Roadmap 2020: Live games
Unity Technologies
 
PPTX
Introduction to Game Development
Sumit Jain
 
PDF
Introduction to blender
Carlos Cámara
 
PPTX
Unity Game Engine - Basics
FirosK2
 
Unity - Game Engine
Geeks Anonymes
 
Unity 3D game engine seminar
NikhilThorat15
 
Unity 3D, A game engine
Md. Irteza rahman Masud
 
Game Architecture and Programming
Sumit Jain
 
Introduction to AR with Unity3D
Andreas Blick
 
An Introduction To Game development
Ahmed
 
What Is A Game Engine
Seth Sivak
 
Introduction to Unity3D Game Engine
Mohsen Mirhoseini
 
Unity Introduction
Juwal Bose
 
Android Application And Unity3D Game Documentation
Sneh Raval
 
Unreal Engine Basics 01 - Game Framework
Nick Pruehs
 
Introduction to Game Development
Shaan Alam
 
blender animation software
Aayushi Jain
 
2022 COMP4010 Lecture1: Introduction to XR
Mark Billinghurst
 
Unity Roadmap 2020: Live games
Unity Technologies
 
Introduction to Game Development
Sumit Jain
 
Introduction to blender
Carlos Cámara
 
Unity Game Engine - Basics
FirosK2
 

Similar to Mobile AR Lecture6 - Introduction to Unity 3D (20)

PDF
Introduction to Unity by Purdue university
asdf936939
 
PDF
Developing VR Experiences with Unity
Mark Billinghurst
 
PDF
An Introduction to the Unity GamingEngine
Stevexm1
 
PDF
Presentación Unity
Laura Milena Parra Navarro
 
PPTX
Cross platform game development
Jerel Hass
 
PPTX
Unity - Building your first real-time 3D project
NexusEdgesupport
 
PPTX
Workingwithunity 110519054824-phpapp01
Srijib Roy
 
PPTX
Cmd unity withc
umairnoora
 
PDF
Unity introduction for programmers
Noam Gat
 
PPTX
Unity workshop
fsxflyer789Productio
 
PDF
Mobile AR Tutorial
Mark Billinghurst
 
PDF
Unity 3d scripting tutorial
Blaž Gregorčič
 
PDF
2%20-%20Scripting%20Tutorial
tutorialsruby
 
PDF
2%20-%20Scripting%20Tutorial
tutorialsruby
 
PDF
Cardboard VR: Building Low Cost VR Experiences
Mark Billinghurst
 
PDF
Unity3d scripting tutorial
hungnttg
 
PDF
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
noorcon
 
PDF
School For Games 2015 - Unity Engine Basics
Nick Pruehs
 
PPTX
Game Development with Unity3D (Game Development lecture 3)
abdulrafaychaudhry
 
PDF
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
noorcon
 
Introduction to Unity by Purdue university
asdf936939
 
Developing VR Experiences with Unity
Mark Billinghurst
 
An Introduction to the Unity GamingEngine
Stevexm1
 
Presentación Unity
Laura Milena Parra Navarro
 
Cross platform game development
Jerel Hass
 
Unity - Building your first real-time 3D project
NexusEdgesupport
 
Workingwithunity 110519054824-phpapp01
Srijib Roy
 
Cmd unity withc
umairnoora
 
Unity introduction for programmers
Noam Gat
 
Unity workshop
fsxflyer789Productio
 
Mobile AR Tutorial
Mark Billinghurst
 
Unity 3d scripting tutorial
Blaž Gregorčič
 
2%20-%20Scripting%20Tutorial
tutorialsruby
 
2%20-%20Scripting%20Tutorial
tutorialsruby
 
Cardboard VR: Building Low Cost VR Experiences
Mark Billinghurst
 
Unity3d scripting tutorial
hungnttg
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
noorcon
 
School For Games 2015 - Unity Engine Basics
Nick Pruehs
 
Game Development with Unity3D (Game Development lecture 3)
abdulrafaychaudhry
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
noorcon
 
Ad

More from Mark Billinghurst (20)

PDF
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
 
PDF
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
Mark Billinghurst
 
PDF
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
Mark Billinghurst
 
PDF
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
Mark Billinghurst
 
PDF
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
PDF
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
 
PDF
Research Directions in Heads-Up Computing
Mark Billinghurst
 
PDF
IVE 2024 Short Course - Lecture18- Hacking Emotions in VR Collaboration.
Mark Billinghurst
 
PDF
IVE 2024 Short Course - Lecture13 - Neurotechnology for Enhanced Interaction ...
Mark Billinghurst
 
PDF
IVE 2024 Short Course Lecture15 - Measuring Cybersickness
Mark Billinghurst
 
PDF
IVE 2024 Short Course - Lecture14 - Evaluation
Mark Billinghurst
 
PDF
IVE 2024 Short Course - Lecture12 - OpenVibe Tutorial
Mark Billinghurst
 
PDF
IVE 2024 Short Course Lecture10 - Multimodal Emotion Recognition in Conversat...
Mark Billinghurst
 
PDF
IVE 2024 Short Course Lecture 9 - Empathic Computing in VR
Mark Billinghurst
 
PDF
IVE 2024 Short Course - Lecture 8 - Electroencephalography (EEG) Basics
Mark Billinghurst
 
PDF
IVE 2024 Short Course - Lecture16- Cognixion Axon-R
Mark Billinghurst
 
PDF
IVE 2024 Short Course - Lecture 2 - Fundamentals of Perception
Mark Billinghurst
 
PDF
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
PDF
The Metaverse: Are We There Yet?
Mark Billinghurst
 
PDF
Human Factors of XR: Using Human Factors to Design XR Systems
Mark Billinghurst
 
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
 
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
Mark Billinghurst
 
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
Mark Billinghurst
 
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
Mark Billinghurst
 
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
 
Research Directions in Heads-Up Computing
Mark Billinghurst
 
IVE 2024 Short Course - Lecture18- Hacking Emotions in VR Collaboration.
Mark Billinghurst
 
IVE 2024 Short Course - Lecture13 - Neurotechnology for Enhanced Interaction ...
Mark Billinghurst
 
IVE 2024 Short Course Lecture15 - Measuring Cybersickness
Mark Billinghurst
 
IVE 2024 Short Course - Lecture14 - Evaluation
Mark Billinghurst
 
IVE 2024 Short Course - Lecture12 - OpenVibe Tutorial
Mark Billinghurst
 
IVE 2024 Short Course Lecture10 - Multimodal Emotion Recognition in Conversat...
Mark Billinghurst
 
IVE 2024 Short Course Lecture 9 - Empathic Computing in VR
Mark Billinghurst
 
IVE 2024 Short Course - Lecture 8 - Electroencephalography (EEG) Basics
Mark Billinghurst
 
IVE 2024 Short Course - Lecture16- Cognixion Axon-R
Mark Billinghurst
 
IVE 2024 Short Course - Lecture 2 - Fundamentals of Perception
Mark Billinghurst
 
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
The Metaverse: Are We There Yet?
Mark Billinghurst
 
Human Factors of XR: Using Human Factors to Design XR Systems
Mark Billinghurst
 
Ad

Recently uploaded (20)

PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Digital Circuits, important subject in CS
contactparinay1
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 

Mobile AR Lecture6 - Introduction to Unity 3D

  • 1. LECTURE 6: INTRODUCTION TO UNITY Mark Billinghurst [email protected] Zi Siang See [email protected] November 29th-30th 2015 Mobile-Based Augmented Reality Development
  • 3. Unity 3D Game Editor
  • 4. What You Need to Learn •  Camera •  Scene View (trans, rot, scale)/Game View •  Position Objects •  Load Assets •  Scripting – C# •  Inspector/Component Properties •  Assemble Scene •  Loading primitive objects •  Easy Materials – creating solid colour/texture •  Lights
  • 6. Download and Install •  Go to unity3d.com/download •  Use Download Assistant – pick components you want
  • 7. Getting Started •  First time running Unity you’ll be asked to create a project •  Specify project name and location •  Can pick asset packages (pre-made content)
  • 8. Unity Interface •  Toolbar, Scene, Hierarchy, Project, Inspector
  • 10. Building Scenes • Use GameObjects: •  Containers that hold different components •  Eg 3D model, texture, animation • Use Inspector •  View and edit object properties and other settings • Use Scene View •  Position objects, camera, lights, other GameObjects etc • Scripting •  Adding interaction, user input, events, etc
  • 11. GameObjects •  Every object in Scene is a GameObject •  GameObjects contain Components •  Eg Transform Component, Camera Component
  • 12. Adding 3D Content •  Create 3D asset using modeling package, or download •  Fbx, Obj file format for 3D models •  Add file to Assets folder in Project •  When project opened 3D model added to Project View •  Drag mesh from Project View into Hierarchy or Scene View •  Creates a game object
  • 13. Positioning/Scaling Objects •  Click on object and choose transform
  • 15. Making a Simple Scene 1.  Create New Project 2.  Create Game Object 3.  Moving main camera position 4.  Adding lights 5.  Adding more objects 6.  Adding physics 7.  Changing object materials 8.  Adding script behaviour
  • 16. CreateProject •  Create new folder and project
  • 18. Create GameObject •  Load a Sphere into the scene •  GameObject -> 3D Object -> Sphere
  • 19. Moving main camera •  Select Main Camera •  Select translate icon •  Move camera
  • 20. Add Light •  GameObject -> Light -> Directional Light •  Use inspector to modify light properties (colour, intensity)
  • 21. Add Physics •  Select Sphere •  Add Rigidbody component •  Add Component -> RigidBody or Component -> Physics -> RigidBody •  Modify inspector properties (mass, drag, etc)
  • 22. Add More Objects •  Add several cubes •  GameObject -> 3D Object – Cube •  Move cube •  Add Rigid Body component (uncheck gravity)
  • 23. Add Material •  Assets -> Create -> Material •  Click Albedo colour box in inspector •  Select colour •  Drag asset onto object to apply
  • 24. Add Script •  Assets -> Create -> C# script •  Edit script using Mono •  Drag script onto Game Object
  • 25. Example C# Script GameObject Rotation using UnityEngine;
 using System.Collections;
 
 public class spin : MonoBehaviour {
 
     // Use this for initialization
     void Start () {
     
     }
     
     // Update is called once per frame
     void Update () {
         this.gameObject.transform.Rotate(Vector3.up*10);
     }
 }
 #
  • 26. Scripting C# Unity 3D •  void Awake(): •  Is called when the first scene is loaded and the game object is active •  void Start(): •  Called on first frame update •  void FixedUpdate(): •  Called before physics calculations are made •  void Update(): •  Called every frame before rendering •  void LateUpdate(): •  Once per frame after update finished
  • 28. More Spinning using UnityEngine; using System.Collections; public class Spin : MonoBehaviour { public float speed = 10; // Update is called once per frame void Update () { transform.Rotate (Vector3.up, speed * Time.deltaTime); } }
  • 29. Tanks Demo •  Explore scripts, assets, objects
  • 30. Resources • Unity Main site • http://www.unity3d.com/ • Holistic Development with Unity • http://holistic3d.com • Official Unity Tutorials • http://unity3d.com/learn/tutorials • Unity Coder Blog • http://unitycoder.com