Your SlideShare is downloading. ×
0
Mark Rondina Unite 12ForIntroduction to Unity for AS3 DevelopersMark Rondina Unite 12 1Tuesday, April 30, 13
Mark Rondina Unite 12 2Introductionhttp://markrondina.com@mrondinamrondina@gmail.comTuesday, April 30, 13
Mark Rondina Unite 12 3Audience PollTuesday, April 30, 13
Mark Rondina Unite 12 4Audience PollTuesday, April 30, 13
Mark Rondina Unite 12 5Session Overview• Window Layout• Where’s my stuff?Unity IDE BasicsUnity ObjectsThe GUI• GameObjects,...
Mark Rondina Unite 12 6Unity IDE Overview - Project WindowProject Window• Linked to the folder on yourcomputer where proje...
Mark Rondina Unite 12 7Unity IDE Overview - Hierarchy Window• List of all objects in the Unity scene• Unity scenes ≈ Flash...
Mark Rondina Unite 12 8Unity IDE Overview - Inspector Window• List of all the properties of selected object• Unity inspect...
Mark Rondina Unite 12 9Unity IDE Overview - Animation Window• List of all the properties of selected object• Edit existing...
Mark Rondina Unite 12 10Unity Objects - Transform• Component of GameObject• Holds Position, Scale and Rotation ofthe objec...
Mark Rondina Unite 12 11Unity Objects - GameObject• Base class for all elements in a scene• Able to access any component o...
Mark Rondina Unite 12 12Unity Objects - Prefab• Container of GameObjects• Can be configured to hold multipleobjects with se...
Mark Rondina Unite 12 13Working With the GUI• Exist in OnGUI ≈ onEnterFrame• Buttons• Labels• Text Input - normal/password...
Mark Rondina Unite 12 14Working With the GUI• Exist in OnGUI ≈ onEnterFrame• Buttons• Labels• Text Input - normal/password...
Mark Rondina Unite 12 15Positioning GUI ElementsGUIvsGUILayout• Positing your GUI elements yourself• May have speed improv...
Mark Rondina Unite 12 16Positioning GUI ElementsGUIvsGUILayout• Positing your GUI elements yourself• May have speed improv...
Mark Rondina Unite 12 17GUI Skinning - IDE• Customize the built-in GUI components• Make your own custom skins• Can set glo...
Mark Rondina Unite 12 18GUI Skinning - Code• Use “private” keyword for your GUISkinvariables• Can be overridden by IDE GUI...
Mark Rondina Unite 12 19GUI Skinning - IDE• Very easy to use• Global access for any GUI elements• Override using scripts i...
Mark Rondina Unite 12 20GUI Skinning - IDE• Very easy to use• Global access for any GUI elements• Override using scripts i...
Mark Rondina Unite 12 21Scripting OptionsBoo Script• Based on Python• Less Verbose• Debugging in MonoDevelopUnityScript• B...
Mark Rondina Unite 12 22Script Popularity SurveyTuesday, April 30, 13
Mark Rondina Unite 12 23Variable ScopeUnityScript• public by default• Vars public && undeclared areaccessible via IDE• sta...
Mark Rondina Unite 12 24Adding ScriptsScripts• Unity treats scripts as components• IDE - drag and drop onto objects (simil...
Mark Rondina Unite 12 25Learning ResourcesOnline• Unity Answers - http://answers.unity3d.com• Unity Forum - http://forum.u...
Mark Rondina Unite 12 26THANK YOU!!http://markrondina.com@mrondinamrondina@gmail.comTuesday, April 30, 13
Upcoming SlideShare
Loading in...5
×

Intro to unity for as3

1,589

Published on

Slides from my presentation at Unite 2012 in Amsterdam.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,589
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
29
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Intro to unity for as3"

  1. 1. Mark Rondina Unite 12ForIntroduction to Unity for AS3 DevelopersMark Rondina Unite 12 1Tuesday, April 30, 13
  2. 2. Mark Rondina Unite 12 2Introductionhttp://markrondina.com@mrondinamrondina@gmail.comTuesday, April 30, 13
  3. 3. Mark Rondina Unite 12 3Audience PollTuesday, April 30, 13
  4. 4. Mark Rondina Unite 12 4Audience PollTuesday, April 30, 13
  5. 5. Mark Rondina Unite 12 5Session Overview• Window Layout• Where’s my stuff?Unity IDE BasicsUnity ObjectsThe GUI• GameObjects, Prefabsand Transforms• Components• Text• GUI elements• GUI skinsScripting• Languages• Adding Scripts• Accessing ScriptsTuesday, April 30, 13
  6. 6. Mark Rondina Unite 12 6Unity IDE Overview - Project WindowProject Window• Linked to the folder on yourcomputer where project is stored• ~/Project Folder/Assets/• Built-in Unity assets are loaded here• Similar to Flash Professional LibraryTuesday, April 30, 13
  7. 7. Mark Rondina Unite 12 7Unity IDE Overview - Hierarchy Window• List of all objects in the Unity scene• Unity scenes ≈ Flash Pro scenes• Can rename objects and elementsHierachy WindowTuesday, April 30, 13
  8. 8. Mark Rondina Unite 12 8Unity IDE Overview - Inspector Window• List of all the properties of selected object• Unity inspector += Flash Pro propertiespanel• Rename objects and elements• Add/Delete and Enable/disablecomponents• Edit/Modify object components• Edit/Modify object properties• Interact with script variables• Assign materials and shadersInspector WindowTuesday, April 30, 13
  9. 9. Mark Rondina Unite 12 9Unity IDE Overview - Animation Window• List of all the properties of selected object• Edit existing animations imported withgeometry• Split animations apart for ease oftriggering and looping• Create new animationsInspector WindowTuesday, April 30, 13
  10. 10. Mark Rondina Unite 12 10Unity Objects - Transform• Component of GameObject• Holds Position, Scale and Rotation ofthe object• Accessed using -GameObject.transform• 3D objects can be cast as Transformsi.e. var myCube:Transform;• Casting as Transform may providespeed increase when working with ScalePosition and Rotation• Access the GameObject parent -myCube.gameObjectTransformTuesday, April 30, 13
  11. 11. Mark Rondina Unite 12 11Unity Objects - GameObject• Base class for all elements in a scene• Able to access any component on theselected object - i.e.GameObject.GetComponent();• Must use to add or removecomponents, such as colliders, scripts.etc• Similar to Flash - Sprite classGameObjectTuesday, April 30, 13
  12. 12. Mark Rondina Unite 12 12Unity Objects - Prefab• Container of GameObjects• Can be configured to hold multipleobjects with set components• Editing of the base Prefab can providequick and easy updates to all linked to it• Similar to Flash - MovieClip class• Convenience of build once and useanywhere• Can be placed on scene or instancescreated from code• Combined with code can be powerful!PrefabTuesday, April 30, 13
  13. 13. Mark Rondina Unite 12 13Working With the GUI• Exist in OnGUI ≈ onEnterFrame• Buttons• Labels• Text Input - normal/password• TextField, TextArea• Vertical/Horizontal Scrollbars• Toggle• Window• ScrollView ≈ scrolling text componentUnity GUI ObjectsTuesday, April 30, 13
  14. 14. Mark Rondina Unite 12 14Working With the GUI• Exist in OnGUI ≈ onEnterFrame• Buttons• Labels• Text Input - normal/password• TextField, TextArea• Vertical/Horizontal Scrollbars• Toggle• Window• ScrollView ≈ scrolling text componentUnity GUI ObjectsDEMO THISTuesday, April 30, 13
  15. 15. Mark Rondina Unite 12 15Positioning GUI ElementsGUIvsGUILayout• Positing your GUI elements yourself• May have speed improvements• For when you know what you’redealing with• Unity’s Layout Manager positions yourGUI elements• Layout is similar to HTML tables• Rapidly getting elements on screen totestTuesday, April 30, 13
  16. 16. Mark Rondina Unite 12 16Positioning GUI ElementsGUIvsGUILayout• Positing your GUI elements yourself• May have speed improvements• For when you know what you’redealing with• Unity’s Layout Manager positions yourGUI elements• Layout is similar to HTML tables• Rapidly getting elements on screen totestDEMO THISTuesday, April 30, 13
  17. 17. Mark Rondina Unite 12 17GUI Skinning - IDE• Customize the built-in GUI components• Make your own custom skins• Can set global GUI fonts and addadditional fonts to use in scripts• If not specified, Unity uses default skinsSkinning in the IDETuesday, April 30, 13
  18. 18. Mark Rondina Unite 12 18GUI Skinning - Code• Use “private” keyword for your GUISkinvariables• Can be overridden by IDE GUI Skin• States need to have same backgroundimage or won’t showSkinning in codeTuesday, April 30, 13
  19. 19. Mark Rondina Unite 12 19GUI Skinning - IDE• Very easy to use• Global access for any GUI elements• Override using scripts if neededSkinning in the IDETuesday, April 30, 13
  20. 20. Mark Rondina Unite 12 20GUI Skinning - IDE• Very easy to use• Global access for any GUI elements• Override using scripts if neededSkinning in the IDEDEMO THISTuesday, April 30, 13
  21. 21. Mark Rondina Unite 12 21Scripting OptionsBoo Script• Based on Python• Less Verbose• Debugging in MonoDevelopUnityScript• Based on Javascript• Allows for strict typing• Familiarity• Pascal case (OnGUI)• Run time and Compile timeerror checkingC#• Established code language• Lots of available libraries• Ability to use Visual Studio• Possible speedimprovementsTuesday, April 30, 13
  22. 22. Mark Rondina Unite 12 22Script Popularity SurveyTuesday, April 30, 13
  23. 23. Mark Rondina Unite 12 23Variable ScopeUnityScript• public by default• Vars public && undeclared areaccessible via IDE• static == global i.e. myScript.staticVar;• private are kept within the script scope• local variables - those within functionsexist during the function and then aremarked for GC** in C# variables are private by defaultTuesday, April 30, 13
  24. 24. Mark Rondina Unite 12 24Adding ScriptsScripts• Unity treats scripts as components• IDE - drag and drop onto objects (similarto Macromedia Director behaviours)• Code - useGameObject.AddComponent(ScriptName)Tuesday, April 30, 13
  25. 25. Mark Rondina Unite 12 25Learning ResourcesOnline• 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/QVohzgOfflinehttp://bit.ly/Nh6bXyTuesday, April 30, 13
  26. 26. Mark Rondina Unite 12 26THANK YOU!!http://markrondina.com@mrondinamrondina@gmail.comTuesday, April 30, 13
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×