UFCEKU-20-3Web Games Programming Unity 3D Basic Concepts Using and Creating Prefabs.

Slides:



Advertisements
Similar presentations
UFCFSU-30-13D Technologies for the Web Creating and Updating a Graphical Heads-Up Display (HUD)
Advertisements

Feature requests for Case Manager By Spar Nord Bank A/S IBM Insight 2014 Spar Nord Bank A/S1.
OOP - Object Oriented Programming Object Oriented Programming is an approach to programming that was developed to make large programs easier to manage.
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
GameCamp! and Game Davis Introduction to Unity®
GameCamp! and Game Davis Creating a 2D Platformer in Unity.
Creating Custom Forms. 2 Design and create a custom form You can create a custom form by modifying an existing form or creating a new form. Either way,
Create slices and hotspots Create links in Web pages Create rollovers from slices Create basic animation Add tweening symbol instances to create animation.
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.
01-Intro-Object-Oriented-Prog-Alice1 Barb Ericson Georgia Institute of Technology Aug 2009 Introduction to Object-Oriented Programming in Alice.
UFCEKU-20-3Web Games Programming Unity 3D Physics Colliders and Object Collisions.
SE 320 – Introduction to Game Development Lecture 4: Programming in Unity & Project Presentations Lecturer: Gazihan Alankuş Please look at the last two.
SE 350 – Programming Games Lecture 6: Programming with Unity Lecturer: Gazihan Alankuş Please look at the last slide for assignments (marked with TODO)
What is Director?  A tool for creating interactive CDs or interactive media and games on the Web.  Combines graphics, sound, video and other media together.
Derived from Kirill Muzykov’s Rocket Mouse Tutorial WakeUpAndCode.com.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
EEC-693/793 Applied Computer Vision with Depth Cameras Lecture 13 Wenbing Zhao
Adding User Interactivity – Lesson 51 Adding User Interactivity Lesson 5.
Java Programming: From Problem Analysis to Program Design, Second Edition1  Learn about basic GUI components.  Explore how the GUI components JFrame,
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.
Web Games Programming Unity Scripting Fundamentals.
UFCFS D Technologies for the Web Unity 3D: Review of Topics and Related Concepts.
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.
UFCEK-20-3Web Games Programming Unity 3D: Review of Topics Publishing for the Web.
Derived from Kirill Muzykov’s Rocket Mouse Tutorial WakeUpAndCode.com.
2a – Object Oriented Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
Derived from Kirill Muzykov’s Rocket Mouse Tutorial WakeUpAndCode.com.
CLASSES CHAPTER Topics  Understanding Classes –The Anatomy of a Class  Class Inheritance –Superclasses and Subclasses –Virtual and Override 2.
SE 350 – Programming Games Lecture 5: Programming with Unity Lecturer: Gazihan Alankuş Please look at the last slide for assignments (marked with TODO)
Methods (part 1) Alice In Action, Ch 2 Slides Credit: Joel Adams, Alice in Action CS120 Lecture August 2012.
UFCFX5-15-3Mobile Device Development Unity 3D Development for Android Unity Mobile Assets.
UFCEKU-20-3Web Games Programming Instantiating World Objects.
UFCFSU-30-13D Technologies for the Web An Introduction to Unity 3D.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
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.
Angry Teapots– using the physics engine in Unity Peter Passmore.
Chapter 5 Introduction to Defining Classes Fundamentals of Java.
UFCEKU-20-3Web Games Programming Creating and Updating a Graphical Heads-Up Display (HUD)
Game Development with Unity3D
EEC-693/793 Applied Computer Vision with Depth Cameras
Quick Intro to Unity Lecture 2.
OOP - Object Oriented Programming
Object-Orientated Programming
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
Character Selection from a lobby in Unity
Game Development Unity3D.
Introduction to Events
EEC-693/793 Applied Computer Vision with Depth Cameras
Unity 2D: Step by Step, Part 2
lecture 8 Our First Project
Simple Windows Applications
Making Procedural Methods
Creating & Using Sprites Adding Colliders
Create a Simple UI Game in 10 Steps
A beginner’s tutorial for Unity and VR
Introduction to Object-Oriented Programming in Alice
Using Templates and Library Items
EEC-693/793 Applied Computer Vision with Depth Cameras
Unity Game Development
Unity Game Development
Presentation transcript:

UFCEKU-20-3Web Games Programming Unity 3D Basic Concepts Using and Creating Prefabs

UFCEKU-20-3Web Games Programming Agenda Role of a Prefab Creating a Prefab Using a Prefab as a World Object Instance Modifying Prefabs to Affect World Objects.

UFCEKU-20-3Web Games Programming Role of Prefabs A prefab is a prefabricated object made of pre-selected components e.g. meshes, textures, physics, scripts etc. Prefabs exist in the Project Window and when dragged and dropped into the world becomes a world object A world object based on a prefab will ‘inherit’ all the properties and behaviours of the prefabricated object on which it is based. When a prefab is modified in the Project Window all world objects based on the prefab will be updated with the new modifications. Some or all of the changes can be ‘overidden ’

UFCEKU-20-3Web Games Programming Camera Mesh Audio Listener The First Person Controller is a prefabricated object FPS.js Code to handle FPS Walker etc. Mesh collider Scripts

UFCEKU-20-3Web Games Programming Creating Prefabs In order to create a Prefab, simply drag a object that you've created in the scene into the Project View. The object's name will turn blue to show that it is a Prefab, then rename your new Prefab The object and all its ‘children’ have been copied into the Prefab data The Prefab can now be re-used in multiple instances The original object in the Hierarchy has now become an ‘instance’ of the new Prefab.

UFCEKU-20-3Web Games Programming Example of a Complex Prefab (Lerptz)

UFCEKU-20-3Web Games Programming Prefab Instance and Inheritance Drag the Prefab from the Project View into the Scene or Hierarchy View This instance is linked to the Prefab If you have selected a Prefab instance, and want to make a change that affects all instances, you can click the Select button in the Inspector to select the source Prefab Inheritance means that whenever the source Prefab changes, those changes are applied to all linked Objects, e.g. adding a new behavior script to a Prefab will affect all linked objects.

UFCEKU-20-3Web Games Programming Modifying a Single Prefab Instance It is possible to change the properties of a single instance while still retaining the link to the Prefab Change any property of a prefab instance in the Inspector Window, and watch as the variable name becomes bold,the variable is now overridden All overridden properties in the instance will not be affected by changes in the source Prefab. This allows you to modify Prefab instances to make them unique from their source Prefabs without breaking the Prefab link.

UFCEKU-20-3Web Games Programming Creating a Simple Prefab (Cube) Cube Cube.js Code to handle message sent by other scripts attached to other objects Prefab created from a cube with a material added and attaching a script.

UFCEKU-20-3Web Games Programming Summary Unity’s Prefab facility allows developers to customize an object’s properties and behaviors inside the 3D environment. Once the object is developed as required it can then act as a prefabricated object for instances (clones) of the object in the environment. If required, properties or behaviors of a particular instance can be overridden without losing the link to the original Prefab. Thus some instances can have specialized properties and behaviors that suit their particular role in the scenario.