Download - Wprowadzenie do unity
![Page 1: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/1.jpg)
![Page 2: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/2.jpg)
Unity3D - What is this ?● 3D game engine (recently also 2D)● Graphics, physics, sounds, ● Works for any type of game.● Scripts written in C#, JavaScript, Boo (? :D )● Desktop, mobile platforms, consoles,
webplayer
![Page 3: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/3.jpg)
Advantages of Unity3D● Indie version is free● Supports DirectX9, DirectX11, PhysX● Easy to learn● Enormous support of community
(UnityAnswers, Asset Store)
![Page 4: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/4.jpg)
Briefly about Unity3DEditor window
![Page 5: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/5.jpg)
Editor window
![Page 6: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/6.jpg)
Scene Hierarchy Scene 1 Scene 3Scene 2
GameObject1 GameObject2
GameObject4
GameObject3
Component 1
Component 2
Component 3
Component 4
Component 1
![Page 7: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/7.jpg)
Briefly about Unity3DComponents
![Page 8: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/8.jpg)
Transform
● Position, rotation, scale● Part of every gameobject, info about hierarchy ● All sorts of translations, rotations etc. in scripts
![Page 9: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/9.jpg)
Mesh renderer, mesh filter● Information about this
model and shader used to draw it.
● Mesh Filter just stores info about mesh
● Mesh Renderer draws the model
![Page 10: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/10.jpg)
Material, Shader
![Page 11: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/11.jpg)
Rigidbody● Basic physics● Mass, gravity, forces● Collision handling
![Page 12: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/12.jpg)
Collider
● Collision detection● Types: box, plane, sphere, mesh, capsule● Triggers
![Page 13: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/13.jpg)
Light
![Page 14: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/14.jpg)
Types of lights in Unity Point light Area lightSpotlightDirectional light
![Page 15: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/15.jpg)
Particle engine
![Page 16: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/16.jpg)
Scripting in Unity3DWhere the fun begins… :D
![Page 17: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/17.jpg)
Using C# in Unity● Scripts are builded by Mono● Most of .NET functionality is available.● Delegates, properties, extended methods, LINQ, ...● You can use MonoDevelop or Visual Studio
![Page 18: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/18.jpg)
About scripts in overall● Scripts are components● Each script is a class● Public fields are seen (and changeable) from
the inspector.
![Page 19: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/19.jpg)
MonoBehaviour Class● Awake(), Start(), Update()● GetComponent<T>()● Instantiate()● Invoke()● Coroutines and “yield”● GameObject.Find()● OnGUI()
![Page 20: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/20.jpg)
![Page 21: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/21.jpg)
GUI● Current ways of creating GUI:
○ GuiTexture, GuiText, GuiLabel components○ OnGUI scripting○ … or buy a plugin :D
● New (way better) GUI system is announced. When ? Soon...
![Page 22: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/22.jpg)
Some of Unity plugins● Touchscript - touch gestures● GoKit - “tweening” (moving objects)● NGUI - GUI creation● Marmoset - Image-based lighting● Photon integration - networking
![Page 23: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/23.jpg)
ExamplesLet’s dive into scripts ;)
![Page 24: Wprowadzenie do unity](https://reader034.vdocuments.us/reader034/viewer/2022042716/55a8923e1a28ab21608b4617/html5/thumbnails/24.jpg)
Q/Aflame wars ? :D