Quick Intro to Unity Lecture 2.

Slides:



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

GameCamp! and Game Davis Introduction to Unity®
GameCamp! and Game Davis Creating a 2D Platformer in Unity.
Intro to Blender Alex Hawker. First Steps Download
© Anselm Spoerri Lecture 11 Flash –Build Flash Website with Animated Navigation Structure –Decide on Overall Navigation Layout, Import Images & Organize.
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)
XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX Buttons Interactive means that the user has some level.
Exercise : Animated Navigation Structure in Flash 1.Develop Answers to “What did you learn in ITI program?” “What do you have to offer?” “What are your.
Derived from Kirill Muzykov’s Rocket Mouse Tutorial WakeUpAndCode.com.
Tutorial 5 Making a Document Interactive. XP Objectives Explore the different button states Add a button from the Buttons library Edit a button instance.
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.
SE 350 – Programming Games Lecture 7: Programming with Unity Lecturer: Gazihan Alankuş Please look at the last slide for assignments (marked with TODO)
Web Games Programming An Introduction to Unity 3D.
UFCFS D Technologies for the Web Unity 3D: Review of Topics and Related Concepts.
Unity 5 Visual Studio Code * Asset Store * FPS * Terrain.
2006 Adobe Systems Incorporated. All Rights Reserved. 1 INTRODUCTION TO ADOBE FLASH CS3.
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.
SE 320 – Introduction to Game Development Lecture 7: Programming Lecturer: Gazihan Alankuş Please look at the last two slides for assignments (marked with.
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.
Building the Events Components– Lesson 111 Building the Events Components Lesson 11.
Problem Solving Methodology Rachel Gauci. Problem Solving Methodology Development Design Analysis Evaluation Solution requirements and constraints. Scope.
Derived from Kirill Muzykov’s Rocket Mouse Tutorial WakeUpAndCode.com.
SE 350 – Programming Games Lecture 5: Programming with Unity Lecturer: Gazihan Alankuş Please look at the last slide for assignments (marked with TODO)
UFCFSU-30-13D Technologies for the Web An Introduction to Unity 3D.
Expressive Intelligence Studio // Center for Games and Playable Media // Unity Pro John Murray Expressive.
INTRO TO UNITY Building your first 3D game. DISCLAIMER  “This website is not affiliated with, maintained, endorsed or sponsored by Unity Technologies.
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.
Game Development with Unity3D
Welcome! Day1, Lesson 1.
EEC-693/793 Applied Computer Vision with Depth Cameras
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.
Unity 2D: Step by Step, Part 4
EEC-693/793 Applied Computer Vision with Depth Cameras
Adding Buttons, Actions, and Sounds
Introducing Blender.
Game Development Unity3D.
Presenting Prezi Michael Pelitera
Introducing Blender.
EEC-693/793 Applied Computer Vision with Depth Cameras
Introducing Blender.
lecture 8 Our First Project
Unreal Engine and C++ We’re finally at a point where we can start working in C++ with Unreal Engine To get everything set up for this properly, we’re going.
Hands-on Introduction to Visual Basic .NET
Game Development Intro to Unreal Engine
A Prime Example of HCI Application
DREAMWEAVER MX 2004 Chapter 7 Working with Layers
Week 6: Time and triggers!
Flash Concepts and Demos - Overview
Fundaments of Game Design
EEC-693/793 Applied Computer Vision with Depth Cameras
Unity Game Development
Unity Game Development
Exercise : Animated Navigation Structure in Animate (= Flash)
Resources and interactions
Exercise : Animated Navigation Structure in Flash
Presentation transcript:

Quick Intro to Unity Lecture 2

My (totally-biased) Thoughts Very clean organization More programmer-friendly (than Unreal) A good model for (parts of) our engine. Licensing is OK …but not for universities

interface Start it up! Hierarchy: a Scene Graph Parent-child relationships Project: collection of assets Inspector: View / create components Edit component properties Scene / Game view: the current scene Warning: don’t do big things in game mode! Render mode Lighting mode

View manipulation Hand-tool selected (Q to enable, W to switch to move): Left-drag to pan Right-drag to rotate Any: ‘F’: Frame selected object (or double-click name) Right-click + WASD + QE Scroll-wheel to zoom Click on axes “cones” to switch to 2d view Click on central box to toggle perspective / ortho

Object manipulation [Add a 3d cube] W, E, R toggle translate, rotate, scale Local / Global button Numeric values

Game object / component model A very clean organization (imo) Add components to add functionality All game objects contain a Transform contains a parent-offset transform matrix internally contains pointers to parent / child g.o.’s Collider (Box, Capsule, Sphere, Mesh, etc.) ParticleEmitter Camera 3D Sound Sources … By adding components, you can call / listen for script methods / callbacks.

prefabs A GameObject “template” Any instances of that prefab can: Modify a component value – that takes precedence Leave a component value alone: If the prefab changes, all of these values are updated. E.g. Make a “coin” prefab (collider, mesh, scale) Drag 100 instances onto scene. Each can have its own position If you modify the collider, all instances automatically change! Create by dragging from Hierarchy to Assets Make instances by dragging from assets to Scene Note the blue name in Hierarchy.

tags and layers Tags Layers A value (integer) attached to each object [Show editing of Tags] e.g. Pickups, DeathTriggers, Player, etc. Very useful in scripts. Layers Similar idea, but more applied to Rendering e.g. Transparent layer, Water, Ignore-Raycast, etc.

Input System Axes and Actions [Show in Settings] Configurable (remappable) Note the names e.g. “Horizontal” / “Vertical” axes e.g. “Jump” button Intentionally not a gamepad / key id or name. [Discuss benefits for game designers]

Scripting overview What’s it for? Basic process Without: static objects that do nothing – boo! Determine what a game object does and when it does it. Examples: Handle collisions Start background music when level starts Update a gui when points are earned. … A taste of “real” programming. Basic process Create a new script asset (text file) Attach to one or more game objects Add / edit functionality to / in script Test in Unity Go back to step 3 until finished.

Scripting overview, cont. [Create a C# script and edit] Documentation: Highlight item, then… Visual Studio: Ctrl + Alt + M, then Ctrl + H MonoDevelop: Ctrl + ‘ Example: Make a player object controlled by input axes Make a pickup prefab and trigger removal on hits. Naming convention e.g. Transform is the class, transform is this object’s instance. The classes sometimes have static-like variables / methods: e.g. Time.deltaTime; // an up-to-date float e.g. Quaternion.Slerp(Quaternion a, Quaternion b, float pcent);

scripting overview, cont. A sampling of methods you can override (events) Start Update FixedUpdate [if we have a RigidBody component] OnCollisionEnter [if we have a Collider component] … public vs. private members Getting components: transform always exists (b/c all GameObjects have it) others you have to do this: e.g. Animator anim = GetComponent<Animator>();

Interacting with other G.OBJ’s Option1: Make a public GameObject variable plus: level-designer can set it negative: fixed before run-time Option2: Find it by name / tag GameObject.Find or method GameObject.FindGameObjectsByTag or FindGameObjectByTag Can modify what you search for at run-time.

Mecanim overview A rigged / animated model has n clips walk, run, idle, etc. Mecanim does the following: Blends between two animation clips Models a state-diagram You modify animation variables in code. The state diagram will transition to a new animation. Frees you from a lot of repetitive code. First step: Import a model with animation clips (optional) Under import settings, set the clip to loop

mecanim overview, cont. Step2: Open Animator (not Animation) window Step3: Drag clips onto stage Step4: Create transitions between clips Step5: Tweak transition criteria / variables Step6: Set variables in script. [There’s much more you can do with Mecanim] Modify how the two clips are blended over time. Mask off parts of the skeleton …

GUI Overview A 2d overlay (HUD’s, minimaps, etc.) Composed of: A canvas: Unity automatically creates one Buttons, Text-boxes, etc. The layout is pretty self-explanatory Unless you get into sprites…another topic! The 2D button (near the top) is very handy. These elements can (and often do) have scripts! NOTE: import UnityEngine.UI or you won’t see UI objects in script!