Upload
lukasz-tenerowicz
View
125
Download
0
Tags:
Embed Size (px)
Citation preview
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
Advantages of Unity3D● Indie version is free● Supports DirectX9, DirectX11, PhysX● Easy to learn● Enormous support of community
(UnityAnswers, Asset Store)
Briefly about Unity3DEditor window
Editor window
Scene Hierarchy Scene 1 Scene 3Scene 2
GameObject1 GameObject2
GameObject4
GameObject3
Component 1
Component 2
Component 3
Component 4
Component 1
Briefly about Unity3DComponents
Transform
● Position, rotation, scale● Part of every gameobject, info about hierarchy ● All sorts of translations, rotations etc. in scripts
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
Material, Shader
Rigidbody● Basic physics● Mass, gravity, forces● Collision handling
Collider
● Collision detection● Types: box, plane, sphere, mesh, capsule● Triggers
Light
Types of lights in Unity Point light Area lightSpotlightDirectional light
Particle engine
Scripting in Unity3DWhere the fun begins… :D
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
About scripts in overall● Scripts are components● Each script is a class● Public fields are seen (and changeable) from
the inspector.
MonoBehaviour Class● Awake(), Start(), Update()● GetComponent<T>()● Instantiate()● Invoke()● Coroutines and “yield”● GameObject.Find()● OnGUI()
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...
Some of Unity plugins● Touchscript - touch gestures● GoKit - “tweening” (moving objects)● NGUI - GUI creation● Marmoset - Image-based lighting● Photon integration - networking
ExamplesLet’s dive into scripts ;)
Q/Aflame wars ? :D