SlideShare uma empresa Scribd logo
1 de 26
Baixar para ler offline
Mark Rondina Unite 12
For
Introduction to Unity for AS3 Developers
Mark Rondina Unite 12 1
Tuesday, April 30, 13
Mark Rondina Unite 12 2
Introduction
http://markrondina.com
@mrondina
mrondina@gmail.com
Tuesday, April 30, 13
Mark Rondina Unite 12 3
Audience Poll
Tuesday, April 30, 13
Mark Rondina Unite 12 4
Audience Poll
Tuesday, April 30, 13
Mark Rondina Unite 12 5
Session Overview
• Window Layout
• Where’s my stuff?
Unity IDE Basics
Unity Objects
The GUI
• GameObjects, Prefabs
and Transforms
• Components
• Text
• GUI elements
• GUI skins
Scripting
• Languages
• Adding Scripts
• Accessing Scripts
Tuesday, April 30, 13
Mark Rondina Unite 12 6
Unity IDE Overview - Project Window
Project Window
• Linked to the folder on your
computer where project is stored
• ~/Project Folder/Assets/
• Built-in Unity assets are loaded here
• Similar to Flash Professional Library
Tuesday, April 30, 13
Mark Rondina Unite 12 7
Unity IDE Overview - Hierarchy Window
• List of all objects in the Unity scene
• Unity scenes ≈ Flash Pro scenes
• Can rename objects and elements
Hierachy Window
Tuesday, April 30, 13
Mark Rondina Unite 12 8
Unity IDE Overview - Inspector Window
• List of all the properties of selected object
• Unity inspector += Flash Pro properties
panel
• Rename objects and elements
• Add/Delete and Enable/disable
components
• Edit/Modify object components
• Edit/Modify object properties
• Interact with script variables
• Assign materials and shaders
Inspector Window
Tuesday, April 30, 13
Mark Rondina Unite 12 9
Unity IDE Overview - Animation Window
• List of all the properties of selected object
• Edit existing animations imported with
geometry
• Split animations apart for ease of
triggering and looping
• Create new animations
Inspector Window
Tuesday, April 30, 13
Mark Rondina Unite 12 10
Unity Objects - Transform
• Component of GameObject
• Holds Position, Scale and Rotation of
the object
• Accessed using -
GameObject.transform
• 3D objects can be cast as Transforms
i.e. var myCube:Transform;
• Casting as Transform may provide
speed increase when working with Scale
Position and Rotation
• Access the GameObject parent -
myCube.gameObject
Transform
Tuesday, April 30, 13
Mark Rondina Unite 12 11
Unity Objects - GameObject
• Base class for all elements in a scene
• Able to access any component on the
selected object - i.e.
GameObject.GetComponent();
• Must use to add or remove
components, such as colliders, scripts.
etc
• Similar to Flash - Sprite class
GameObject
Tuesday, April 30, 13
Mark Rondina Unite 12 12
Unity Objects - Prefab
• Container of GameObjects
• Can be configured to hold multiple
objects with set components
• Editing of the base Prefab can provide
quick and easy updates to all linked to it
• Similar to Flash - MovieClip class
• Convenience of build once and use
anywhere
• Can be placed on scene or instances
created from code
• Combined with code can be powerful!
Prefab
Tuesday, April 30, 13
Mark Rondina Unite 12 13
Working With the GUI
• Exist in OnGUI ≈ onEnterFrame
• Buttons
• Labels
• Text Input - normal/password
• TextField, TextArea
• Vertical/Horizontal Scrollbars
• Toggle
• Window
• ScrollView ≈ scrolling text component
Unity GUI Objects
Tuesday, April 30, 13
Mark Rondina Unite 12 14
Working With the GUI
• Exist in OnGUI ≈ onEnterFrame
• Buttons
• Labels
• Text Input - normal/password
• TextField, TextArea
• Vertical/Horizontal Scrollbars
• Toggle
• Window
• ScrollView ≈ scrolling text component
Unity GUI Objects
DEMO THIS
Tuesday, April 30, 13
Mark Rondina Unite 12 15
Positioning GUI Elements
GUI
vs
GUILayout
• Positing your GUI elements yourself
• May have speed improvements
• For when you know what you’re
dealing with
• Unity’s Layout Manager positions your
GUI elements
• Layout is similar to HTML tables
• Rapidly getting elements on screen to
test
Tuesday, April 30, 13
Mark Rondina Unite 12 16
Positioning GUI Elements
GUI
vs
GUILayout
• Positing your GUI elements yourself
• May have speed improvements
• For when you know what you’re
dealing with
• Unity’s Layout Manager positions your
GUI elements
• Layout is similar to HTML tables
• Rapidly getting elements on screen to
test
DEMO THIS
Tuesday, April 30, 13
Mark Rondina Unite 12 17
GUI Skinning - IDE
• Customize the built-in GUI components
• Make your own custom skins
• Can set global GUI fonts and add
additional fonts to use in scripts
• If not specified, Unity uses default skins
Skinning in the IDE
Tuesday, April 30, 13
Mark Rondina Unite 12 18
GUI Skinning - Code
• Use “private” keyword for your GUISkin
variables
• Can be overridden by IDE GUI Skin
• States need to have same background
image or won’t show
Skinning in code
Tuesday, April 30, 13
Mark Rondina Unite 12 19
GUI Skinning - IDE
• Very easy to use
• Global access for any GUI elements
• Override using scripts if needed
Skinning in the IDE
Tuesday, April 30, 13
Mark Rondina Unite 12 20
GUI Skinning - IDE
• Very easy to use
• Global access for any GUI elements
• Override using scripts if needed
Skinning in the IDE
DEMO THIS
Tuesday, April 30, 13
Mark Rondina Unite 12 21
Scripting Options
Boo Script
• Based on Python
• Less Verbose
• Debugging in MonoDevelop
UnityScript
• Based on Javascript
• Allows for strict typing
• Familiarity
• Pascal case (OnGUI)
• Run time and Compile time
error checking
C#
• Established code language
• Lots of available libraries
• Ability to use Visual Studio
• Possible speed
improvements
Tuesday, April 30, 13
Mark Rondina Unite 12 22
Script Popularity Survey
Tuesday, April 30, 13
Mark Rondina Unite 12 23
Variable Scope
UnityScript
• public by default
• Vars public && undeclared are
accessible via IDE
• static == global i.e. myScript.staticVar;
• private are kept within the script scope
• local variables - those within functions
exist during the function and then are
marked for GC
** in C# variables are private by default
Tuesday, April 30, 13
Mark Rondina Unite 12 24
Adding Scripts
Scripts
• Unity treats scripts as components
• IDE - drag and drop onto objects (similar
to Macromedia Director behaviours)
• Code - use
GameObject.AddComponent(ScriptName)
Tuesday, April 30, 13
Mark Rondina Unite 12 25
Learning Resources
Online
• Unity Answers - http://answers.unity3d.com
• Unity Forum - http://forum.unity3d.com/
• Unify Wiki - http://wiki.unity3d.com
• Unity Documentation - http://bit.ly/3wgqcp
• Unity Script Reference - http://bit.ly/NX42Db
• Reference Manual - http://docs.unity3d.com
• BIG LIST of TUTS! - http://bit.ly/oXSGNy
• Virtual Game Lab - http://bit.ly/QVohzg
Offline
http://bit.ly/Nh6bXy
Tuesday, April 30, 13
Mark Rondina Unite 12 26
THANK YOU!!
http://markrondina.com
@mrondina
mrondina@gmail.com
Tuesday, April 30, 13

Mais conteĂşdo relacionado

Semelhante a Intro Unity AS3 Developers

Mobile AR Lecture6 - Introduction to Unity 3D
Mobile AR Lecture6 - Introduction to Unity 3DMobile AR Lecture6 - Introduction to Unity 3D
Mobile AR Lecture6 - Introduction to Unity 3DMark Billinghurst
 
Off the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your OrganizationOff the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your OrganizationRick Vugteveen
 
[UniteKorea2013] Serialization in Depth
[UniteKorea2013] Serialization in Depth[UniteKorea2013] Serialization in Depth
[UniteKorea2013] Serialization in DepthWilliam Hugo Yang
 
DocDoku: Using web technologies in a desktop application. OW2con'15, November...
DocDoku: Using web technologies in a desktop application. OW2con'15, November...DocDoku: Using web technologies in a desktop application. OW2con'15, November...
DocDoku: Using web technologies in a desktop application. OW2con'15, November...OW2
 
DocDokuPLM presentation - OW2Con 2015 Community Award winner
DocDokuPLM presentation - OW2Con 2015 Community Award winnerDocDokuPLM presentation - OW2Con 2015 Community Award winner
DocDokuPLM presentation - OW2Con 2015 Community Award winnerDocDoku
 
Chromium wayland
Chromium waylandChromium wayland
Chromium waylandGyuyoung Kim
 
XPages Blast - Lotusphere 2013
XPages Blast - Lotusphere 2013XPages Blast - Lotusphere 2013
XPages Blast - Lotusphere 2013Tim Clark
 
Automated Snap Package build processes without the Build Service
Automated Snap Package build processes without the Build ServiceAutomated Snap Package build processes without the Build Service
Automated Snap Package build processes without the Build ServiceDani Llewellyn
 
[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GIT[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GITWong Hoi Sing Edison
 
ACCU 2013 Taking Scala into the Enterpise
ACCU 2013 Taking Scala into the EnterpiseACCU 2013 Taking Scala into the Enterpise
ACCU 2013 Taking Scala into the EnterpisePeter Pilgrim
 
Extending Android's Platform Toolsuite
Extending Android's Platform ToolsuiteExtending Android's Platform Toolsuite
Extending Android's Platform ToolsuiteOpersys inc.
 
Frontend Engineer Toolbox
Frontend Engineer ToolboxFrontend Engineer Toolbox
Frontend Engineer ToolboxYnon Perek
 
Creating great Unity games for Windows 10 - Part 2
Creating great Unity games for Windows 10 - Part 2Creating great Unity games for Windows 10 - Part 2
Creating great Unity games for Windows 10 - Part 2Jiri Danihelka
 
Instant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesInstant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesYshay Yaacobi
 
Intro to Flutter SDK
Intro to Flutter SDKIntro to Flutter SDK
Intro to Flutter SDKdigitaljoni
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
Workflow Engines + Luigi
Workflow Engines + LuigiWorkflow Engines + Luigi
Workflow Engines + LuigiVladislav Supalov
 
From Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEFrom Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEintelliyole
 
Being Productive at Work
Being Productive at WorkBeing Productive at Work
Being Productive at WorkHitesh Patel
 

Semelhante a Intro Unity AS3 Developers (20)

Mobile AR Lecture6 - Introduction to Unity 3D
Mobile AR Lecture6 - Introduction to Unity 3DMobile AR Lecture6 - Introduction to Unity 3D
Mobile AR Lecture6 - Introduction to Unity 3D
 
Off the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your OrganizationOff the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your Organization
 
[UniteKorea2013] Serialization in Depth
[UniteKorea2013] Serialization in Depth[UniteKorea2013] Serialization in Depth
[UniteKorea2013] Serialization in Depth
 
Drools & jBPM Workshop London 2013
Drools & jBPM Workshop London 2013Drools & jBPM Workshop London 2013
Drools & jBPM Workshop London 2013
 
DocDoku: Using web technologies in a desktop application. OW2con'15, November...
DocDoku: Using web technologies in a desktop application. OW2con'15, November...DocDoku: Using web technologies in a desktop application. OW2con'15, November...
DocDoku: Using web technologies in a desktop application. OW2con'15, November...
 
DocDokuPLM presentation - OW2Con 2015 Community Award winner
DocDokuPLM presentation - OW2Con 2015 Community Award winnerDocDokuPLM presentation - OW2Con 2015 Community Award winner
DocDokuPLM presentation - OW2Con 2015 Community Award winner
 
Chromium wayland
Chromium waylandChromium wayland
Chromium wayland
 
XPages Blast - Lotusphere 2013
XPages Blast - Lotusphere 2013XPages Blast - Lotusphere 2013
XPages Blast - Lotusphere 2013
 
Automated Snap Package build processes without the Build Service
Automated Snap Package build processes without the Build ServiceAutomated Snap Package build processes without the Build Service
Automated Snap Package build processes without the Build Service
 
[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GIT[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GIT
 
ACCU 2013 Taking Scala into the Enterpise
ACCU 2013 Taking Scala into the EnterpiseACCU 2013 Taking Scala into the Enterpise
ACCU 2013 Taking Scala into the Enterpise
 
Extending Android's Platform Toolsuite
Extending Android's Platform ToolsuiteExtending Android's Platform Toolsuite
Extending Android's Platform Toolsuite
 
Frontend Engineer Toolbox
Frontend Engineer ToolboxFrontend Engineer Toolbox
Frontend Engineer Toolbox
 
Creating great Unity games for Windows 10 - Part 2
Creating great Unity games for Windows 10 - Part 2Creating great Unity games for Windows 10 - Part 2
Creating great Unity games for Windows 10 - Part 2
 
Instant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesInstant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositories
 
Intro to Flutter SDK
Intro to Flutter SDKIntro to Flutter SDK
Intro to Flutter SDK
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
Workflow Engines + Luigi
Workflow Engines + LuigiWorkflow Engines + Luigi
Workflow Engines + Luigi
 
From Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEFrom Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDE
 
Being Productive at Work
Being Productive at WorkBeing Productive at Work
Being Productive at Work
 

Último

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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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 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
 

Último (20)

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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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 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
 

Intro Unity AS3 Developers

  • 1. Mark Rondina Unite 12 For Introduction to Unity for AS3 Developers Mark Rondina Unite 12 1 Tuesday, April 30, 13
  • 2. Mark Rondina Unite 12 2 Introduction http://markrondina.com @mrondina mrondina@gmail.com Tuesday, April 30, 13
  • 3. Mark Rondina Unite 12 3 Audience Poll Tuesday, April 30, 13
  • 4. Mark Rondina Unite 12 4 Audience Poll Tuesday, April 30, 13
  • 5. Mark Rondina Unite 12 5 Session Overview • Window Layout • Where’s my stuff? Unity IDE Basics Unity Objects The GUI • GameObjects, Prefabs and Transforms • Components • Text • GUI elements • GUI skins Scripting • Languages • Adding Scripts • Accessing Scripts Tuesday, April 30, 13
  • 6. Mark Rondina Unite 12 6 Unity IDE Overview - Project Window Project Window • Linked to the folder on your computer where project is stored • ~/Project Folder/Assets/ • Built-in Unity assets are loaded here • Similar to Flash Professional Library Tuesday, April 30, 13
  • 7. Mark Rondina Unite 12 7 Unity IDE Overview - Hierarchy Window • List of all objects in the Unity scene • Unity scenes ≈ Flash Pro scenes • Can rename objects and elements Hierachy Window Tuesday, April 30, 13
  • 8. Mark Rondina Unite 12 8 Unity IDE Overview - Inspector Window • List of all the properties of selected object • Unity inspector += Flash Pro properties panel • Rename objects and elements • Add/Delete and Enable/disable components • Edit/Modify object components • Edit/Modify object properties • Interact with script variables • Assign materials and shaders Inspector Window Tuesday, April 30, 13
  • 9. Mark Rondina Unite 12 9 Unity IDE Overview - Animation Window • List of all the properties of selected object • Edit existing animations imported with geometry • Split animations apart for ease of triggering and looping • Create new animations Inspector Window Tuesday, April 30, 13
  • 10. Mark Rondina Unite 12 10 Unity Objects - Transform • Component of GameObject • Holds Position, Scale and Rotation of the object • Accessed using - GameObject.transform • 3D objects can be cast as Transforms i.e. var myCube:Transform; • Casting as Transform may provide speed increase when working with Scale Position and Rotation • Access the GameObject parent - myCube.gameObject Transform Tuesday, April 30, 13
  • 11. Mark Rondina Unite 12 11 Unity Objects - GameObject • Base class for all elements in a scene • Able to access any component on the selected object - i.e. GameObject.GetComponent(); • Must use to add or remove components, such as colliders, scripts. etc • Similar to Flash - Sprite class GameObject Tuesday, April 30, 13
  • 12. Mark Rondina Unite 12 12 Unity Objects - Prefab • Container of GameObjects • Can be congured to hold multiple objects with set components • Editing of the base Prefab can provide quick and easy updates to all linked to it • Similar to Flash - MovieClip class • Convenience of build once and use anywhere • Can be placed on scene or instances created from code • Combined with code can be powerful! Prefab Tuesday, April 30, 13
  • 13. Mark Rondina Unite 12 13 Working With the GUI • Exist in OnGUI ≈ onEnterFrame • Buttons • Labels • Text Input - normal/password • TextField, TextArea • Vertical/Horizontal Scrollbars • Toggle • Window • ScrollView ≈ scrolling text component Unity GUI Objects Tuesday, April 30, 13
  • 14. Mark Rondina Unite 12 14 Working With the GUI • Exist in OnGUI ≈ onEnterFrame • Buttons • Labels • Text Input - normal/password • TextField, TextArea • Vertical/Horizontal Scrollbars • Toggle • Window • ScrollView ≈ scrolling text component Unity GUI Objects DEMO THIS Tuesday, April 30, 13
  • 15. Mark Rondina Unite 12 15 Positioning GUI Elements GUI vs GUILayout • Positing your GUI elements yourself • May have speed improvements • For when you know what you’re dealing with • Unity’s Layout Manager positions your GUI elements • Layout is similar to HTML tables • Rapidly getting elements on screen to test Tuesday, April 30, 13
  • 16. Mark Rondina Unite 12 16 Positioning GUI Elements GUI vs GUILayout • Positing your GUI elements yourself • May have speed improvements • For when you know what you’re dealing with • Unity’s Layout Manager positions your GUI elements • Layout is similar to HTML tables • Rapidly getting elements on screen to test DEMO THIS Tuesday, April 30, 13
  • 17. Mark Rondina Unite 12 17 GUI Skinning - IDE • Customize the built-in GUI components • Make your own custom skins • Can set global GUI fonts and add additional fonts to use in scripts • If not specied, Unity uses default skins Skinning in the IDE Tuesday, April 30, 13
  • 18. Mark Rondina Unite 12 18 GUI Skinning - Code • Use “private” keyword for your GUISkin variables • Can be overridden by IDE GUI Skin • States need to have same background image or won’t show Skinning in code Tuesday, April 30, 13
  • 19. Mark Rondina Unite 12 19 GUI Skinning - IDE • Very easy to use • Global access for any GUI elements • Override using scripts if needed Skinning in the IDE Tuesday, April 30, 13
  • 20. Mark Rondina Unite 12 20 GUI Skinning - IDE • Very easy to use • Global access for any GUI elements • Override using scripts if needed Skinning in the IDE DEMO THIS Tuesday, April 30, 13
  • 21. Mark Rondina Unite 12 21 Scripting Options Boo Script • Based on Python • Less Verbose • Debugging in MonoDevelop UnityScript • Based on Javascript • Allows for strict typing • Familiarity • Pascal case (OnGUI) • Run time and Compile time error checking C# • Established code language • Lots of available libraries • Ability to use Visual Studio • Possible speed improvements Tuesday, April 30, 13
  • 22. Mark Rondina Unite 12 22 Script Popularity Survey Tuesday, April 30, 13
  • 23. Mark Rondina Unite 12 23 Variable Scope UnityScript • public by default • Vars public && undeclared are accessible via IDE • static == global i.e. myScript.staticVar; • private are kept within the script scope • local variables - those within functions exist during the function and then are marked for GC ** in C# variables are private by default Tuesday, April 30, 13
  • 24. Mark Rondina Unite 12 24 Adding Scripts Scripts • Unity treats scripts as components • IDE - drag and drop onto objects (similar to Macromedia Director behaviours) • Code - use GameObject.AddComponent(ScriptName) Tuesday, April 30, 13
  • 25. Mark Rondina Unite 12 25 Learning Resources Online • Unity Answers - http://answers.unity3d.com • Unity Forum - http://forum.unity3d.com/ • Unify Wiki - http://wiki.unity3d.com • Unity Documentation - http://bit.ly/3wgqcp • Unity Script Reference - http://bit.ly/NX42Db • Reference Manual - http://docs.unity3d.com • BIG LIST of TUTS! - http://bit.ly/oXSGNy • Virtual Game Lab - http://bit.ly/QVohzg Offline http://bit.ly/Nh6bXy Tuesday, April 30, 13
  • 26. Mark Rondina Unite 12 26 THANK YOU!! http://markrondina.com @mrondina mrondina@gmail.com Tuesday, April 30, 13