SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie 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
 
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
 
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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 

Kürzlich hochgeladen (20)

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 

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 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
  • 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 specified, 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