SlideShare uma empresa Scribd logo
1 de 37
Introduction
Sarah Sexton
Technical Evangelist
Twitter: @Saelia
Microsoft, Chicago, IL
http://aka.ms/sarahsexton
www.SheBuildsGames.com
sarahse@microsoft.com
Phase One: Environment
Customizing your Workspace
1. Setup Editor Layout 2 by 3
2. Drag Project tab below the Hierarchy
3. Set view slider to minimum on Project panel
File > New Scene
File > Save Scene As,
name it Nightmares 01
in Scenes folder
Customizing your Workspace
Environment
1. Locate Environment Prefabs in the Project panel Prefabs folder
2. Drag into Scene or Hierarchy
3. Ensure it is at Position (0,0,0) in Transform
4. Repeat 1-3 for the Lights prefabs
5. Save your Scene (Ctrl+S)
(Nightmares 02)
Environment
1. GameObject menu > 3D Object > Quad
2. Rename to Floor
3. Ensure it is at Position (0,0,0) in Transform
4. Set Rotation (90, 0 0) in Transform
5. Set Scale to (100, 100, 1) in Transform
Environment
1. Remove Mesh Renderer Component
from the Floor game object
2. Set the Floor game object to use the
Floor layer at the top of the Inspector panel
3. Save your Scene (Ctrl+S) (Nightmares 03)
Environment
1. GameObject > Create Empty
2. Rename GameObject to
BackgroundMusic
3. Add Component > Audio > Audio
Source
1. Audio Clip >
Circle Select >
Background
Music
2. Check Loop
and set
Volume to 0.1
3. Save your
Scene (Ctrl+S)
(Nightmares 04)
Circle Select
Phase Two: Player Character
Player Character
1. Locate the Player model in
Models > Characters folder of
the Project panel
2. Drag it into the Scene or
Hierarchy panels
3. Set the Position to (0,0,0) in
Transform
4. Set the Tag to Player in the
drop-down in Inspector
Player Character
1. Select the Animation folder and
click Create on the Project panel,
choose Animator Controller
2. Name this new asset PlayerAC
3. Drag and drop it onto the Player
in the Hierarchy
1. Double-click PlayerAC
asset in Project >
Animation
2. Dock the Animator
window by the Scene
view
Player Character
1. Expand the Player model in
Models > Characters
2. Drag the Idle, Move and Death
animations to empty space in the
Animator window to create states.
3. Right-click Idle state and choose
Set as Default
4. Create a bool parameter named
IsWalking
5. Create a Trigger parameter
named Death
Player Character
1. Right-click Idle and Make Transition to Move
2. Select the Transition arrow you made
3. Set the Condition for this to IsWalking = true
4. Right-click Move and Make Transition to Idle
5. Set the Condition for this to IsWalking = false
6. Right-click ‘Any State’ and Make Transition to Death
Player Character
1. Set Condition for this to Death (trigger) 2. Select Player game object, Add Component > Physics > Rigidbody
3. Set Drag & Angular Drag to Infinity 4. Expand the Constraints, Freeze the Y Position, and Freeze the X
and Z Rotations
Player Character
1. Select Player game object, Add Component > Physics >
Capsule Collider
2. Set Center to (0.2, 0.6, 0)
3. Set Height to 1.2
Player Character
1. Add Component > Audio > Audio Source
2. Audio Clip > Circle select Player Hurt
3. Uncheck Play On Awake
4. Locate PlayerMovement script in Scripts >
Player
5. Drag & Drop this to Player game object in
Hierarchy
6. Save your Scene (Ctrl+S) (Nightmare 05)
Player Character
1. Double-click the icon of the PlayerMovement script to open it
in the Script editor.
Player Character: Move, Normalization
Player Character – Raycasting, Quaternions
Player Character
1. File > Save your script and return to the Unity editor
2. Press Play at the top of the interface to try out your game!
3. Stop Play (do not use Pause.)
DEMO
Phase Three: Camera Setup
1. Select the Main Camera in Hierarchy
2. Set the Transform Position to (1, 15, -22)
3. Set the Transform Rotation to (30, 0, 0)
4. In the Camera component set the Projection to Orthographic
mode
5. Set the Size value 4.5
Camera Setup
1. Set Background Color to Black
2. Save your Scene (Ctrl+S)
3. Select the Camera folder in the Scripts folder of the Project
panel
4. Click Create > C# Script on Project panel
5. Name the script CameraFollow
Camera Setup
1. Drag and drop the CameraFollow script onto the Main Camera
in Hierarchy
2. Save your scene now!
3. Click Open at the top of the Inspector or double-click the
script’s icon to open it for editing
Camera Setup
Camera Setup
Camera Setup
Camera Setup
1. Save your Script, and return to Unity
2. Select the MainCamera and assignment Player from the
Hierarchy to the Target variable on CameraFollow
3. Save your Player as a Prefab by dragging the Player
game object from Hierarchy to the Prefabs folder in the
Project. Save, and press Play to test!
Building your first game in Unity 3d  by Sarah Sexton
Building your first game in Unity 3d  by Sarah Sexton

Mais conteúdo relacionado

Mais procurados

4. catch the ball
4. catch the ball4. catch the ball
4. catch the ballMarc Jones
 
Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...
Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...
Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...dendipermadi
 
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKey
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKeyInstructions for Scratch Pong Game Adaptation to use with MaKey MaKey
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKeyRenee Neumeier
 
120 tips about_photoshop
120 tips about_photoshop120 tips about_photoshop
120 tips about_photoshopGalmher
 
Windows 7 tips tricks
Windows 7 tips tricksWindows 7 tips tricks
Windows 7 tips trickschenley
 
Cheat rise of nation
Cheat rise of nationCheat rise of nation
Cheat rise of nationJimmy Deanz
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA GameSohil Gupta
 
Windows 7 Tips And Tricks
Windows 7 Tips And TricksWindows 7 Tips And Tricks
Windows 7 Tips And Tricksskendall1
 
Petrel F 3 seismic intersections and data manipulation 2018 v1.1
Petrel F 3 seismic intersections and data manipulation 2018 v1.1Petrel F 3 seismic intersections and data manipulation 2018 v1.1
Petrel F 3 seismic intersections and data manipulation 2018 v1.1Sigve Hamilton Aspelund
 

Mais procurados (16)

4. catch the ball
4. catch the ball4. catch the ball
4. catch the ball
 
Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...
Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...
Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...
 
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKey
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKeyInstructions for Scratch Pong Game Adaptation to use with MaKey MaKey
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKey
 
Proe
ProeProe
Proe
 
Maya
MayaMaya
Maya
 
Flash Tutorial
Flash TutorialFlash Tutorial
Flash Tutorial
 
What’s new to power point
What’s new to power pointWhat’s new to power point
What’s new to power point
 
120 tips about_photoshop
120 tips about_photoshop120 tips about_photoshop
120 tips about_photoshop
 
waagen-ecard
waagen-ecardwaagen-ecard
waagen-ecard
 
Windows 7 tips tricks
Windows 7 tips tricksWindows 7 tips tricks
Windows 7 tips tricks
 
Cheat rise of nation
Cheat rise of nationCheat rise of nation
Cheat rise of nation
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
 
Edtech PP.
Edtech PP.Edtech PP.
Edtech PP.
 
Typest
TypestTypest
Typest
 
Windows 7 Tips And Tricks
Windows 7 Tips And TricksWindows 7 Tips And Tricks
Windows 7 Tips And Tricks
 
Petrel F 3 seismic intersections and data manipulation 2018 v1.1
Petrel F 3 seismic intersections and data manipulation 2018 v1.1Petrel F 3 seismic intersections and data manipulation 2018 v1.1
Petrel F 3 seismic intersections and data manipulation 2018 v1.1
 

Semelhante a Building your first game in Unity 3d by Sarah Sexton

Play RICOH THETA 360 Videos in Unity Shanyuan Teng
Play RICOH THETA 360 Videos in Unity Shanyuan TengPlay RICOH THETA 360 Videos in Unity Shanyuan Teng
Play RICOH THETA 360 Videos in Unity Shanyuan TengTHETA Unofficial Guide
 
Inventor project-dynamic-simulation-guide-en
Inventor project-dynamic-simulation-guide-enInventor project-dynamic-simulation-guide-en
Inventor project-dynamic-simulation-guide-enjulio valverde cruz
 
WP7 HUB_XNA overview
WP7 HUB_XNA overviewWP7 HUB_XNA overview
WP7 HUB_XNA overviewMICTT Palma
 
controlling_animations
controlling_animationscontrolling_animations
controlling_animationstutorialsruby
 
controlling_animations
controlling_animationscontrolling_animations
controlling_animationstutorialsruby
 
Game development with Cocos2d
Game development with Cocos2dGame development with Cocos2d
Game development with Cocos2dVinsol
 
Fps tutorial 1
Fps tutorial 1Fps tutorial 1
Fps tutorial 1unityshare
 
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2Kobkrit Viriyayudhakorn
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)noorcon
 
Actionscript 3 - Session 2 Getting Started Flash IDE
Actionscript 3 - Session 2 Getting Started Flash IDEActionscript 3 - Session 2 Getting Started Flash IDE
Actionscript 3 - Session 2 Getting Started Flash IDEOUM SAOKOSAL
 
Fps tutorial 2
Fps tutorial 2Fps tutorial 2
Fps tutorial 2unityshare
 
Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - IntroductionFrancis Seriña
 
Run and jump tutorial (part 3) behaviours
Run and jump tutorial (part 3)   behavioursRun and jump tutorial (part 3)   behaviours
Run and jump tutorial (part 3) behavioursMuhd Basheer
 
Tutorial Realm Crafter
Tutorial Realm CrafterTutorial Realm Crafter
Tutorial Realm CrafterAlejandrukii
 

Semelhante a Building your first game in Unity 3d by Sarah Sexton (20)

Action script
Action scriptAction script
Action script
 
Unity 13 space shooter game
Unity 13 space shooter gameUnity 13 space shooter game
Unity 13 space shooter game
 
Play RICOH THETA 360 Videos in Unity Shanyuan Teng
Play RICOH THETA 360 Videos in Unity Shanyuan TengPlay RICOH THETA 360 Videos in Unity Shanyuan Teng
Play RICOH THETA 360 Videos in Unity Shanyuan Teng
 
Ninja Cat Flyer - 1 of 6
Ninja Cat Flyer - 1 of 6Ninja Cat Flyer - 1 of 6
Ninja Cat Flyer - 1 of 6
 
Unity workshop
Unity workshopUnity workshop
Unity workshop
 
Inventor project-dynamic-simulation-guide-en
Inventor project-dynamic-simulation-guide-enInventor project-dynamic-simulation-guide-en
Inventor project-dynamic-simulation-guide-en
 
WP7 HUB_XNA
WP7 HUB_XNAWP7 HUB_XNA
WP7 HUB_XNA
 
WP7 HUB_XNA overview
WP7 HUB_XNA overviewWP7 HUB_XNA overview
WP7 HUB_XNA overview
 
controlling_animations
controlling_animationscontrolling_animations
controlling_animations
 
controlling_animations
controlling_animationscontrolling_animations
controlling_animations
 
Game development with Cocos2d
Game development with Cocos2dGame development with Cocos2d
Game development with Cocos2d
 
Fps tutorial 1
Fps tutorial 1Fps tutorial 1
Fps tutorial 1
 
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
 
XNA coding series
XNA coding seriesXNA coding series
XNA coding series
 
Actionscript 3 - Session 2 Getting Started Flash IDE
Actionscript 3 - Session 2 Getting Started Flash IDEActionscript 3 - Session 2 Getting Started Flash IDE
Actionscript 3 - Session 2 Getting Started Flash IDE
 
Fps tutorial 2
Fps tutorial 2Fps tutorial 2
Fps tutorial 2
 
Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - Introduction
 
Run and jump tutorial (part 3) behaviours
Run and jump tutorial (part 3)   behavioursRun and jump tutorial (part 3)   behaviours
Run and jump tutorial (part 3) behaviours
 
Tutorial Realm Crafter
Tutorial Realm CrafterTutorial Realm Crafter
Tutorial Realm Crafter
 

Mais de BeMyApp

Introduction to epid
Introduction to epidIntroduction to epid
Introduction to epidBeMyApp
 
Introduction ciot workshop premeetup
Introduction ciot workshop premeetupIntroduction ciot workshop premeetup
Introduction ciot workshop premeetupBeMyApp
 
Présentation des APIs cognitives IBM Watson
Présentation des APIs cognitives IBM WatsonPrésentation des APIs cognitives IBM Watson
Présentation des APIs cognitives IBM WatsonBeMyApp
 
Crédit Agricole S.A. Personae et Parcours
Crédit Agricole S.A. Personae et ParcoursCrédit Agricole S.A. Personae et Parcours
Crédit Agricole S.A. Personae et ParcoursBeMyApp
 
Cisco Paris DevNet Hackathon slideshow - Intro
Cisco Paris DevNet Hackathon slideshow - IntroCisco Paris DevNet Hackathon slideshow - Intro
Cisco Paris DevNet Hackathon slideshow - IntroBeMyApp
 
Tumeurs Neuroendocrines : une vue d'ensemble
Tumeurs Neuroendocrines : une vue d'ensembleTumeurs Neuroendocrines : une vue d'ensemble
Tumeurs Neuroendocrines : une vue d'ensembleBeMyApp
 
Using intel's real sense to create games with natural user interfaces justi...
Using intel's real sense to create games with natural user interfaces   justi...Using intel's real sense to create games with natural user interfaces   justi...
Using intel's real sense to create games with natural user interfaces justi...BeMyApp
 
Introduction to using the R200 camera & Realsense SDK in Unity3d - Jon Collins
Introduction to using the R200 camera & Realsense SDK in Unity3d - Jon CollinsIntroduction to using the R200 camera & Realsense SDK in Unity3d - Jon Collins
Introduction to using the R200 camera & Realsense SDK in Unity3d - Jon CollinsBeMyApp
 
Audio Mixer in Unity5 - Andy Touch
Audio Mixer in Unity5 - Andy TouchAudio Mixer in Unity5 - Andy Touch
Audio Mixer in Unity5 - Andy TouchBeMyApp
 
Shaders - Claudia Doppioslash - Unity With the Best
Shaders - Claudia Doppioslash - Unity With the BestShaders - Claudia Doppioslash - Unity With the Best
Shaders - Claudia Doppioslash - Unity With the BestBeMyApp
 
[HACKATHON CISCO PARIS] Slideshow du workshop Smart City
[HACKATHON CISCO PARIS] Slideshow du workshop Smart City[HACKATHON CISCO PARIS] Slideshow du workshop Smart City
[HACKATHON CISCO PARIS] Slideshow du workshop Smart CityBeMyApp
 
Tools to Save Time
Tools to Save TimeTools to Save Time
Tools to Save TimeBeMyApp
 
[Workshop e résidents] présentation intent, craft ai, dalkia et incubateur
[Workshop e résidents] présentation intent, craft ai, dalkia et incubateur[Workshop e résidents] présentation intent, craft ai, dalkia et incubateur
[Workshop e résidents] présentation intent, craft ai, dalkia et incubateurBeMyApp
 
[Webinar E-résidents #1] Présentation des différents métiers du bâtiment conn...
[Webinar E-résidents #1] Présentation des différents métiers du bâtiment conn...[Webinar E-résidents #1] Présentation des différents métiers du bâtiment conn...
[Webinar E-résidents #1] Présentation des différents métiers du bâtiment conn...BeMyApp
 
[IoT World Forum Webinar] Review of CMX Cisco technology
[IoT World Forum Webinar] Review of CMX Cisco technology[IoT World Forum Webinar] Review of CMX Cisco technology
[IoT World Forum Webinar] Review of CMX Cisco technologyBeMyApp
 
HP Helion Episode 6: Cloud Foundry Summit Recap
HP Helion Episode 6: Cloud Foundry Summit RecapHP Helion Episode 6: Cloud Foundry Summit Recap
HP Helion Episode 6: Cloud Foundry Summit RecapBeMyApp
 
Webinar UI/UX by Francesco Marcellino
Webinar UI/UX by Francesco MarcellinoWebinar UI/UX by Francesco Marcellino
Webinar UI/UX by Francesco MarcellinoBeMyApp
 
HP Helion Webinar #5 - Security Beyond Firewalls
HP Helion Webinar #5 - Security Beyond FirewallsHP Helion Webinar #5 - Security Beyond Firewalls
HP Helion Webinar #5 - Security Beyond FirewallsBeMyApp
 
HP Helion Webinar #4 - Open stack the magic pill
HP Helion Webinar #4 - Open stack the magic pillHP Helion Webinar #4 - Open stack the magic pill
HP Helion Webinar #4 - Open stack the magic pillBeMyApp
 
HP Helion European Webinar Series ,Webinar #3
HP Helion European Webinar Series ,Webinar #3 HP Helion European Webinar Series ,Webinar #3
HP Helion European Webinar Series ,Webinar #3 BeMyApp
 

Mais de BeMyApp (20)

Introduction to epid
Introduction to epidIntroduction to epid
Introduction to epid
 
Introduction ciot workshop premeetup
Introduction ciot workshop premeetupIntroduction ciot workshop premeetup
Introduction ciot workshop premeetup
 
Présentation des APIs cognitives IBM Watson
Présentation des APIs cognitives IBM WatsonPrésentation des APIs cognitives IBM Watson
Présentation des APIs cognitives IBM Watson
 
Crédit Agricole S.A. Personae et Parcours
Crédit Agricole S.A. Personae et ParcoursCrédit Agricole S.A. Personae et Parcours
Crédit Agricole S.A. Personae et Parcours
 
Cisco Paris DevNet Hackathon slideshow - Intro
Cisco Paris DevNet Hackathon slideshow - IntroCisco Paris DevNet Hackathon slideshow - Intro
Cisco Paris DevNet Hackathon slideshow - Intro
 
Tumeurs Neuroendocrines : une vue d'ensemble
Tumeurs Neuroendocrines : une vue d'ensembleTumeurs Neuroendocrines : une vue d'ensemble
Tumeurs Neuroendocrines : une vue d'ensemble
 
Using intel's real sense to create games with natural user interfaces justi...
Using intel's real sense to create games with natural user interfaces   justi...Using intel's real sense to create games with natural user interfaces   justi...
Using intel's real sense to create games with natural user interfaces justi...
 
Introduction to using the R200 camera & Realsense SDK in Unity3d - Jon Collins
Introduction to using the R200 camera & Realsense SDK in Unity3d - Jon CollinsIntroduction to using the R200 camera & Realsense SDK in Unity3d - Jon Collins
Introduction to using the R200 camera & Realsense SDK in Unity3d - Jon Collins
 
Audio Mixer in Unity5 - Andy Touch
Audio Mixer in Unity5 - Andy TouchAudio Mixer in Unity5 - Andy Touch
Audio Mixer in Unity5 - Andy Touch
 
Shaders - Claudia Doppioslash - Unity With the Best
Shaders - Claudia Doppioslash - Unity With the BestShaders - Claudia Doppioslash - Unity With the Best
Shaders - Claudia Doppioslash - Unity With the Best
 
[HACKATHON CISCO PARIS] Slideshow du workshop Smart City
[HACKATHON CISCO PARIS] Slideshow du workshop Smart City[HACKATHON CISCO PARIS] Slideshow du workshop Smart City
[HACKATHON CISCO PARIS] Slideshow du workshop Smart City
 
Tools to Save Time
Tools to Save TimeTools to Save Time
Tools to Save Time
 
[Workshop e résidents] présentation intent, craft ai, dalkia et incubateur
[Workshop e résidents] présentation intent, craft ai, dalkia et incubateur[Workshop e résidents] présentation intent, craft ai, dalkia et incubateur
[Workshop e résidents] présentation intent, craft ai, dalkia et incubateur
 
[Webinar E-résidents #1] Présentation des différents métiers du bâtiment conn...
[Webinar E-résidents #1] Présentation des différents métiers du bâtiment conn...[Webinar E-résidents #1] Présentation des différents métiers du bâtiment conn...
[Webinar E-résidents #1] Présentation des différents métiers du bâtiment conn...
 
[IoT World Forum Webinar] Review of CMX Cisco technology
[IoT World Forum Webinar] Review of CMX Cisco technology[IoT World Forum Webinar] Review of CMX Cisco technology
[IoT World Forum Webinar] Review of CMX Cisco technology
 
HP Helion Episode 6: Cloud Foundry Summit Recap
HP Helion Episode 6: Cloud Foundry Summit RecapHP Helion Episode 6: Cloud Foundry Summit Recap
HP Helion Episode 6: Cloud Foundry Summit Recap
 
Webinar UI/UX by Francesco Marcellino
Webinar UI/UX by Francesco MarcellinoWebinar UI/UX by Francesco Marcellino
Webinar UI/UX by Francesco Marcellino
 
HP Helion Webinar #5 - Security Beyond Firewalls
HP Helion Webinar #5 - Security Beyond FirewallsHP Helion Webinar #5 - Security Beyond Firewalls
HP Helion Webinar #5 - Security Beyond Firewalls
 
HP Helion Webinar #4 - Open stack the magic pill
HP Helion Webinar #4 - Open stack the magic pillHP Helion Webinar #4 - Open stack the magic pill
HP Helion Webinar #4 - Open stack the magic pill
 
HP Helion European Webinar Series ,Webinar #3
HP Helion European Webinar Series ,Webinar #3 HP Helion European Webinar Series ,Webinar #3
HP Helion European Webinar Series ,Webinar #3
 

Último

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Último (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Building your first game in Unity 3d by Sarah Sexton

  • 1.
  • 2. Introduction Sarah Sexton Technical Evangelist Twitter: @Saelia Microsoft, Chicago, IL http://aka.ms/sarahsexton www.SheBuildsGames.com sarahse@microsoft.com
  • 4. Customizing your Workspace 1. Setup Editor Layout 2 by 3 2. Drag Project tab below the Hierarchy 3. Set view slider to minimum on Project panel
  • 5. File > New Scene File > Save Scene As, name it Nightmares 01 in Scenes folder Customizing your Workspace
  • 6. Environment 1. Locate Environment Prefabs in the Project panel Prefabs folder 2. Drag into Scene or Hierarchy 3. Ensure it is at Position (0,0,0) in Transform 4. Repeat 1-3 for the Lights prefabs 5. Save your Scene (Ctrl+S) (Nightmares 02)
  • 7. Environment 1. GameObject menu > 3D Object > Quad 2. Rename to Floor 3. Ensure it is at Position (0,0,0) in Transform 4. Set Rotation (90, 0 0) in Transform 5. Set Scale to (100, 100, 1) in Transform
  • 8. Environment 1. Remove Mesh Renderer Component from the Floor game object 2. Set the Floor game object to use the Floor layer at the top of the Inspector panel 3. Save your Scene (Ctrl+S) (Nightmares 03)
  • 9. Environment 1. GameObject > Create Empty 2. Rename GameObject to BackgroundMusic 3. Add Component > Audio > Audio Source
  • 10. 1. Audio Clip > Circle Select > Background Music 2. Check Loop and set Volume to 0.1 3. Save your Scene (Ctrl+S) (Nightmares 04) Circle Select
  • 11.
  • 12. Phase Two: Player Character
  • 13. Player Character 1. Locate the Player model in Models > Characters folder of the Project panel 2. Drag it into the Scene or Hierarchy panels 3. Set the Position to (0,0,0) in Transform 4. Set the Tag to Player in the drop-down in Inspector
  • 14. Player Character 1. Select the Animation folder and click Create on the Project panel, choose Animator Controller 2. Name this new asset PlayerAC 3. Drag and drop it onto the Player in the Hierarchy
  • 15. 1. Double-click PlayerAC asset in Project > Animation 2. Dock the Animator window by the Scene view
  • 16. Player Character 1. Expand the Player model in Models > Characters 2. Drag the Idle, Move and Death animations to empty space in the Animator window to create states. 3. Right-click Idle state and choose Set as Default 4. Create a bool parameter named IsWalking 5. Create a Trigger parameter named Death
  • 17. Player Character 1. Right-click Idle and Make Transition to Move 2. Select the Transition arrow you made 3. Set the Condition for this to IsWalking = true 4. Right-click Move and Make Transition to Idle 5. Set the Condition for this to IsWalking = false 6. Right-click ‘Any State’ and Make Transition to Death
  • 18.
  • 19. Player Character 1. Set Condition for this to Death (trigger) 2. Select Player game object, Add Component > Physics > Rigidbody 3. Set Drag & Angular Drag to Infinity 4. Expand the Constraints, Freeze the Y Position, and Freeze the X and Z Rotations
  • 20. Player Character 1. Select Player game object, Add Component > Physics > Capsule Collider 2. Set Center to (0.2, 0.6, 0) 3. Set Height to 1.2
  • 21. Player Character 1. Add Component > Audio > Audio Source 2. Audio Clip > Circle select Player Hurt 3. Uncheck Play On Awake 4. Locate PlayerMovement script in Scripts > Player 5. Drag & Drop this to Player game object in Hierarchy 6. Save your Scene (Ctrl+S) (Nightmare 05)
  • 22. Player Character 1. Double-click the icon of the PlayerMovement script to open it in the Script editor.
  • 23.
  • 24. Player Character: Move, Normalization
  • 25. Player Character – Raycasting, Quaternions
  • 26.
  • 27. Player Character 1. File > Save your script and return to the Unity editor 2. Press Play at the top of the interface to try out your game! 3. Stop Play (do not use Pause.) DEMO
  • 28.
  • 29. Phase Three: Camera Setup 1. Select the Main Camera in Hierarchy 2. Set the Transform Position to (1, 15, -22) 3. Set the Transform Rotation to (30, 0, 0) 4. In the Camera component set the Projection to Orthographic mode 5. Set the Size value 4.5
  • 30. Camera Setup 1. Set Background Color to Black 2. Save your Scene (Ctrl+S) 3. Select the Camera folder in the Scripts folder of the Project panel 4. Click Create > C# Script on Project panel 5. Name the script CameraFollow
  • 31. Camera Setup 1. Drag and drop the CameraFollow script onto the Main Camera in Hierarchy 2. Save your scene now! 3. Click Open at the top of the Inspector or double-click the script’s icon to open it for editing
  • 35. Camera Setup 1. Save your Script, and return to Unity 2. Select the MainCamera and assignment Player from the Hierarchy to the Target variable on CameraFollow 3. Save your Player as a Prefab by dragging the Player game object from Hierarchy to the Prefabs folder in the Project. Save, and press Play to test!

Notas do Editor

  1. Unity is a fully integrated game engine that you use to create games and other 3D interactive content. You import assets such as 3D models and textures, and then assemble these art assets into a game in Unity. When your Unity project is completed, you then build the project to a desired platform, such as web, mobile or desktop.
  2. My responsibilities include speaking to user groups, writing cool pieces of code, blogging and tweeting about Microsoft services, and reaching out to the development community and students. I help student, community, and startup developers find success on Windows. I work with them via local user groups, speaking at conferences and universities where I can talk about anything ranging from why windows is right for you, to actual coding advice for apps.
  3. Project Browser: In this view, you can access and manage the assets that belong to your project. http://docs.unity3d.com/Manual/ProjectView.html Hierarchy: The Hierarchy contains every GameObject in the current Scene. The Scene View is your interactive sandbox. You will use the Scene View to select and position environments, the player, the camera, enemies, and all other GameObjects.  The Inspector displays detailed information about your currently selected GameObject, including all attached Components and their properties. Here, you modify the functionality of GameObjects in your scene. The Toolbar consists of five basic controls that relate to different parts of the Editor. Pan, Move, Rotate, Scale, Resize. Transform Gizmo Toggles – affect the Scene View display Play/Pause/Step Buttons. Layers Drop-down – controls which objects are displayed in Scene View Layout Drop-down – controls arrangement of all Views
  4. Public float speed = 6f; Vector3 movement; Animator anim; Rigidbody playerRigidbody; Int floorMask; Float camRayLength = 100f;
  5. void Awake () { floorMask = LayerMask.GetMask (“Floor”); Anim = GetComponent <Animator> (); playerRigidbody = GetComponent <Rigidbody> (); } void FixedUpdate() { float h = Input.GetAxisRaw (“Horizonal”); float v = Input.GetAxisRaw (“Vertical”); }
  6. void Move (float h, float v) { movement.Set (h, 0f, v); movement = movement.normalized * speed * Time.deltaTime; playerRigidbody.MovePosition (transform.position + movement); }
  7. void Turning() { Ray camRay = Camera.main.ScreenPointToRay (Input.mousePosition); RaycastHit floorHit; if (Physics.Raycast (camRay, out floorHit, camRayLength, floorMask)) { Vector3 playerToMouse = floorHit.point - transform.position; playerToMouse.y = 0f; Quaternion newRotation = Quaternion.LookRotation (playerToMouse); playerRigidbody.MoveRotation (newRotation); } } //Quaternion = defines the desired rotation that the joint should rotate into.
  8. void Animating (float h, float v) { bool walking = h != 0f || v != 0f; anim.SetBool (“IsWalking”, walking); } void FixedUpdate() { float h = Input.GetAxisRaw (“Horizonal”); float v = Input.GetAxisRaw (“Vertical”); Move (h, v); Turning (); Animating (h, v); }
  9. Unity is a fully integrated game engine that you use to create games and other 3D interactive content. You import assets such as 3D models and textures, and then assemble these art assets into a game in Unity. When your Unity project is completed, you then build the project to a desired platform, such as web, mobile or desktop.