Unity Overview Using Unity 3.5 (Free version) [1]:

Slides:



Advertisements
Similar presentations
Yingcai Xiao Game Development Intro to Unreal Engine.
Advertisements

Derived from Kirill Muzykov’s Rocket Mouse Tutorial WakeUpAndCode.com.
INNER WORKINGS OF UNITY 3D. WHAT WE ARE GOING TO COVER Intro to Unity Physics & Game Objects Cameras & Lighting Textures & Materials Quaternions and Rotation.
GameCamp! and Game Davis Introduction to Unity®
GameCamp! and Game Davis Creating a 2D Platformer in Unity.
Yingcai Xiao Game Development with Unity3D Inside/Outside Unity3D.
© Anselm Spoerri Lecture 11 Flash –Build Flash Website with Animated Navigation Structure –Decide on Overall Navigation Layout, Import Images & Organize.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
HELLO WORLD: YOUR FIRST PROGRAM CHAPTER Topics  Hello World?  Creating a Unity Project –The Unity Project Folder  MonoDevelop: Unity's Code Editor.
Based on Roll-a-ball video tutorial from Unity Technologies Part WakeUpAndCode.com.
Unity 3D game IDE 1.  Unity is a multi-platform, integrated IDE for scripting games, and working with 3D virtual worlds  Including:  Game engine ▪
SE 320 – Introduction to Game Development Lecture 11: Animations and GoKit Lecturer: Gazihan Alankuş Please look at the last slides for assignments (marked.
SE 350 – Programming Games Lecture 6: Programming with Unity Lecturer: Gazihan Alankuş Please look at the last slide for assignments (marked with TODO)
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
Derived from Kirill Muzykov’s Rocket Mouse Tutorial WakeUpAndCode.com.
Advanced Level Course. Site Extras Site Extras consist of four categories: Stationeries Site Trash Designs Components.
UFCEKU-20-3Web Games Programming Unity 3D Basic Concepts Using and Creating Prefabs.
EEC-693/793 Applied Computer Vision with Depth Cameras Lecture 13 Wenbing Zhao
SE 320 – Introduction to Game Development Lecture 8: Animations, GUIs, Debugging and IDEs Lecturer: Gazihan Alankuş Please look at the last two slides.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
Web Games Programming An Introduction to Unity 3D.
UFCFS D Technologies for the Web Unity 3D: Review of Topics and Related Concepts.
Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target.
Unity 5 Visual Studio Code * Asset Store * FPS * Terrain.
 UDK and Unity are both game engines that offer a wide variety of options to create pretty much any type of game.  Each game engine has a built in environment.
Learning Unity. Getting Unity
SE 320 – Introduction to Game Development Lecture 3: Unity’s Interface and Concepts Lecturer: Gazihan Alankuş Please look at the last two slides for assignments.
Yingcai Xiao Game Development with Unity3D. Outline IDE Engine Assets Tutorial Examples Inside.
Yingcai Xiao Game Development Intro to Unreal Engine.
UFCEK-20-3Web Games Programming Unity 3D: Review of Topics Publishing for the Web.
LESSON #10: Digital Playtesting & Introduction to Character Animation with Mecanim DGMD E-70 Principles of Game Design.
Derived from Kirill Muzykov’s Rocket Mouse Tutorial WakeUpAndCode.com.
GameDevClub CODE CHEAT SHEET NOTE: ALL OF THE CODE IS CASE-SENSITIVE AND THE SYNTAX IS STRICT SO A LOT OF YOUR ERRORS WILL PROBABLY COME FROM TYPOS If.
SE 350 – Programming Games Lecture 5: Programming with Unity Lecturer: Gazihan Alankuş Please look at the last slide for assignments (marked with TODO)
UFCEKU-20-3Web Games Programming Instantiating World Objects.
UFCFSU-30-13D Technologies for the Web An Introduction to Unity 3D.
Design Visualization Software Introduction / Review.
Expressive Intelligence Studio // Center for Games and Playable Media // Unity Pro John Murray Expressive.
Cosc 5/4735 Unity 3D Getting Started Guide for Android.
INTRO TO UNITY Building your first 3D game. DISCLAIMER  “This website is not affiliated with, maintained, endorsed or sponsored by Unity Technologies.
What why and how? Telerik School Academy Unity 2D Game Development.
Today Javadoc. Packages and static import. Viewing API source code. Upcoming Topics: –protected access modifier –Using the debugger in Eclipse –JUnit testing.
Yingcai Xiao Game Development with Unity3D Inside/Outside Unity3D.
Angry Teapots– using the physics engine in Unity Peter Passmore.
Building Games for the Humanities with Unity3D Rudy McDaniel University of Central Florida Orlando, FL USA.
Behavior trees & The C# programming language for Java programmers
Game Development with Unity3D
Welcome! Day1, Lesson 1.
EEC-693/793 Applied Computer Vision with Depth Cameras
Quick Intro to Unity Lecture 2.
Game Development with Unity3D Inside/Outside Unity3D
Quick Intro to Unreal Lecture 7.
3GB3 Game Design Unity 3D Basics.
More (C#) Scripting Day 2, Lesson 1.
EEC-693/793 Applied Computer Vision with Depth Cameras
Ogre Overview Lecture 3.
Ogre Overview.
Game Development Unity3D.
EEC-693/793 Applied Computer Vision with Depth Cameras
Child Actor Component Templates
Game Development Intro to Unreal Engine
A Prime Example of HCI Application
Week 6: Time and triggers!
Myo + Oculus Rift Tutorial
EEC-693/793 Applied Computer Vision with Depth Cameras
Unity Game Development
Unity Game Development
Unity Game Development
Advanced 3D Art and Animation
Presentation transcript:

Unity Overview Using Unity 3.5 (Free version) [1]: [2]: [3]: pt pt

What is it? A Game Engine / IDE – A level editor – Management of Resources Meshes, lights, cameras, particle effects, … – Plugin (Component) architecture – Script support (JavaScript, C#, Boo) Versions: – Free (0$), Pro ($1500) Flash (+$1500), iOS (+$1500), Droid (+$1500), Team (+$500) – [Pro] NavMesh – [Pro] Audio Filtering – [Pro] Advanced pre-made shaders – [Team] SVN-like functionality – [iOS/Droid] Deploy to iOS/Droid devices (OpenGL ES?)

First step Create a new project – A new directory tree Assets – put your resources here Library, ProjectSettings, Temp A new.unity file – Each one is a "level" (group) Placement data for all level objects – Parameters for each Global settings – A binary (unfortunately) file in /Assets/ – Can have multiple "level's" at one time GUI / Menu "level", Level1-n (role of build settings)

Unity Player (IDE/Editor) overview TransformToolsPreview/Play Scene Inspector Hierarchy Project (Assets)

Add Resources & Instances Either – Save a resource in the Assets folder – Or drag-and-drop into the Project pane If you edit the resource, it's automatically updated in Unity – a great feature! Some supported resources –.blend (2.5+) : runs the fbx exporter –.fbx (maya, motionbuilder, …) – images – sounds – script files –…–… Drag it onto the scene (or hierarchy) to add to the hierarchy.

Scene Navigation [Alt+LDrag]: rotate camera [Alt+MDrag]: Pan camera [Alt+RDrag] or [Scroll]: Zoom [RClick] + WASDQE: – First-person camera mode – WASD to move – QE to go down/up [F]: Center the view around the selected game object [ArrowKeys]: Move on the XZ plane (ground) You can also use the buttons in the upper-left (SLOW!)

GameObjects A "thing" in the game – the current Level's ground – the player – enemies – health pickups – trigger point – …

GameObjects, cont. [Create an emtpy game object] Composed of components – Transform (a scene node) All GameObjects have this. Scale, Rotation, Translation… …from parent node The hierarchy pane is really a scene graph – Mesh Filter / Mesh Renderer – Physics Collider (capsule, box, mesh, …) RigidBody

GameObjects, cont. – ParticleEmitter – GUITexture / GUIText – AudioSource (2D or 3D, depending on asset) –…–… – Script (for anything else) Tags and Layers – Layers: Selective rendering, selective hit-detection A bitmask (32-bit integer) e.g. "Ground", "Post-processing" – Tag: Useful mainly in scripting Also a 32-bit integer A "group" (fast FindWithTag methods) e.g. "Main Camera", "Player", "Pickup", "Exit"

Prefabs A template for a commonly-used game object Assets=>Create=>Prefab – Drag an existing object from Hierarchy to new Prefab – Shows up in blue in Hierarchy – Drag more instances of Prefab onto scene – If you change the prefab definition, all instances will change too. You can modify the values of component attributes, but not the "structure" (e.g. components, although you can disable them) You can "break" the prefab connection by GameObject=>Break Prefab Instance.

Character Controller Import under Assets=>Import Package… Put a 3 rd person controller and camera on the player node – Drag the main camera transform onto the 3 rd person camera's "camera transform" property – Make sure the main camera is tagged with the "Main Camera" tag. [Later] A good example of a complicated script

Scripts (UnityScript) UnityScript is basically JavaScript Other choices: C#, Boo Assets=>Create=>JavaScript Double-click to go into MonoDevelop – Two functions add automatically: Start and Update – Example (in Update) transform.Rotate(0,5,0); Debug output – print("Hey!" + tempVar); – Display at bottom of window, or in the output window.

Scripts, cont. Variable declaration public var myVar [: myType] [= myVal]; public var direction : int = 99; – Other modifiers: static: visible to other scripts private: can't be modified in Inspector. Basic Types: int, float, string, boolean Enumerations: enum myEnum {state1, state2}; public var myState = myEnum.state1; Unity types: ce/20_class_hierarchy.html ce/20_class_hierarchy.html

Scripts, cont. Classes – Foo.js Creates a class named Foo Variables in Foo.js are members, functions are methods. – Other way: class MyRecord extends XYZ { public var name: integer; function doSomething() { /*…*/ } };

Scripts, cont. Public Variables are visible (and changeable) in the Inspector – A great feature! – [Demo] – Note: you can change them at runtime (but it's not permanent)

Classes, cont. Class must have same name as.js file (case-sensitive) To add a script to a GameObject, derive from MonoBehavior Constructor (function with same name as class) seems to be called: – before Start method is called – When (re-)entering Player (after pressing stop) You seem to be able to reference (other) scripts anywhere in the project.

Classes, cont. Some other important methods / functions to overload: – Full List: – LateUpdate: Called after all Update's – OnMouseEnter [GUIElement's] – OnCollisionEnter Called when this collider collides when another Note: one collider must have a non-kinematic rigidbody – OnCollisionStay –…–…

Accessing components The game object most likely has other components attached to it. E.g. You have a "Transform" component in Inspector – Access it in script like: "transform.position.x" – Note lower-case (this is the rule)

Messages Format GameObject.SendMessage(string, param); var go = GameObject.Find("Mine4087"); go.SendMessage("explode", 14.3); // (In any script(s) attached to Mine4087) function explode(timer : float) { // … } There is also a BroadcastMessage – Similar structure. Is sent to all child GameObjects recursively.

Scripting Misc. Time.deltaTime // Time since last Update. Application.LoadLevel(x) – x is an integer (see BuildSettings) or string – Removes all other objects, unless… DontDestroyOnLoad(gameObject); – Keeps it from being destroyed on LoadLevel call

GUI Made of GameObject's Add a GUILayer component to (a) camera. Make more components for each element – Make them children to the GUI layer component. Position: – (0,0,z): bottom-left – (1,1,z): top-right

Blender Review?

Character animations From Blender: – Keyframe the skeleton – Open a DopeSheet pane Select "Action Editor" from the drop-down Click "New" or "+" to add current keys to a new action. – The name you type will show up in Unity.