Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Unity3D First Lesson

975ff6c8166f6f32889f004a904ffa39?s=47 Oursky Limited
January 20, 2014
120

Unity3D First Lesson

Introduction to Unity3D engine

975ff6c8166f6f32889f004a904ffa39?s=128

Oursky Limited

January 20, 2014
Tweet

Transcript

  1. Unity3D First Lesson

  2. Unity Unity is a game development ecosystem: a powerful rendering

    engine fully integrated with a complete set of intuitive tools and rapid workflows to create interactive 3D and 2D content. http://unity3d.com/
  3. Get Unity http://unity3d.com/unity/download

  4. None
  5. None
  6. Disclaimer This sharing section is about how to create a

    3D game with Unity3D engine. I have no knowledge about making a 2D game with it. (Please ask Kenji :p)
  7. Language for Scripts C# UnityScript Based on JavaScript Boo http://boo.codehaus.org/

    A stablished object oriented statically typed programming language
  8. Language for Scripts Maximum Features C# Boo Simplicity Boo UnityScript

    General Language Documentation C# Unity Specific Tutorials UnityScript C# iPhone development UnityScript C#
  9. Mono Behavior

  10. Structure Project Scenes Assets Scripts Animations Materials

  11. Camera Camera

  12. Physics • Rigidbodies • Colliders • Physics Materials • Triggers

    • Joints • Character Controllers Physics
  13. Object: Position Transformation

  14. Object: Rotation Gimbal Lock

  15. Object: Rotation The quaternions are a number system that extends

    the complex numbers. Quaternions
  16. Object: Rotation Quaternions rotation Rotation

  17. Object: Rotation But in fact… http://docs.unity3d.com/Documentation/ScriptReference/Quaternion.html

  18. Object: Rotation You can do this safely: transform.rotation = Quaternion.AngleAxis(90,

    Vector3.up); or transform.rotation = Quaternion.Euler(0, 90, 0); or transform.Rotate (0,0,90);
  19. More: Lerp Use Lerp to ‘Linearly Interpolate’ (smoothly transition) between

    values for various data types Mathf.Lerp() Vector3.Lerp() Quaternion.Lerp() Lerp
  20. More: Lerp Usage param += Time.deltaTime * speed; transform.position.x =

    Mathf.Lerp(0, 3, param); Lerp
  21. More: PlayerPrefs Something like SharedPreferences on Android Usage: PlayerPrefs

  22. GUI: NGUI An asset from Assets Store NGUI: Next-Gen UI

    kit NGUI Standard single-seat license: $95 NGUI Professional single-seat license: $200 NGUI Site License, unlimited developers in a single studio: $2000 http://www.tasharen.com/?page_id=140
  23. GUI: NGUI http://www.tasharen.com/?page_id=140

  24. GUI: UnityGUI Basically you can use Box Button Toggle Label

    Text Field Text Area Window Horizontal Slider Vertical Slider Horizontal Scollbar Vertical Scrollbar
  25. GUI: UnityGUI Set up GUI inside OnGUI() void OnGUI() {

    GUI.skin = MyGUISkin; if (GUI.Button(new Rect(0,0,50,50), "Text on Image", " MyNewStyle")) GUI.Label(new Rect(100, 0, 50, 50), "", " MyNewStyle"); } GUI
  26. Support Platforms Export to different platforms

  27. Support Platforms Notes for multi-platforms • Handle touches and keyboard

    input • If you need native features (e.g. iTunes), need to write plugins yourself • May consider to buy iOS PRO or Android PRO for all features on mobile
  28. Assets Store 3D Models Animation Audio Complete Projects Editor Extensions

    Particle Systems Scripting Services Shaders Textures & Materials https://www.assetstore.unity3d.com/