Player preferences, Loading Scenes, Activating and Enabling

Slides:



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

UFCFSU-30-13D Technologies for the Web Creating and Using GUI Components.
Fibonacci Numbers A simple example of program design.
UFCFS D Technologies for the Web Unity 3D: Review of Topics and Related Concepts.
Variables and Functions. Open your Encoder program Let’s begin by opening the “Labyrinth Auto Straight” code. Save this file as Labyrinth with variables.
11 Adding Tomato Targets Session Session Overview  We now have a game which lets a player bounce a piece of cheese on a bread bat  Now we have.
CNS 1410 Graphical User Interfaces. Obectives Students should understand the difference between a procedural program and an Event Driven Program. Students.
SE 320 – Introduction to Game Development Lecture 7: Programming Lecturer: Gazihan Alankuş Please look at the last two slides for assignments (marked with.
UFCEK-20-3Web Games Programming Unity 3D: Review of Topics Publishing for the Web.
Unity GUI Creating and Using GUI Components. Agenda GUI Components GUI Layout Using Styles and Skins for Design ‘Look and Feel’ Scripting GUI Communication.
XNA Basic Displaying Image & Collision Detect. What’s format image that XNA support? XNA support only.bmp.png and.jpg image..PNG have transparent region.
Arithmetic, Class Variables and Class Methods Week 11
11/5/2016CS150 Introduction to Computer Science 1 Announcements  Assignment 6 due on Wednesday, December 3, 2003  Final Exam on Tuesday, December 9,
Object Oriented Programming Dr. Ennis-Cole CECS 5100.
BOOLEAN OPERATIONS AND CONDITIONALS CHAPTER 20 1.
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.
1 11/30/05CS150 Introduction to Computer Science 1 Structs.
SE Team 9 GlobalFlyer Cole Hoosier Ryan Hannebaum Leanne Gray Alex Stampbach.
13/10/2016CS150 Introduction to Computer Science 1 Multidimensional Arrays  Arrays can have more than one column  Two dimensional arrays have two columns.
 How can we find/refer to objects at runtime?  This must be dynamic because objects may come and go.  How can we solve this problem?
OBJECTIVE AND OUTCOMES Objective: To be able to create images in binary format and understand the part metadata plays in recreating images. Outcomes:
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
3.1 Objects. Data type. Set of values and operations on those values. Primitive/Built-In types. n Usually single values n Can build arrays but they can.
Variables Bryce Boe 2012/09/05 CS32, Summer 2012 B.
Sound and more Animations
EEC-693/793 Applied Computer Vision with Depth Cameras
Chapter 1.2 Introduction to C++ Programming
Array in C# Array in C# RIHS Arshad Khan
CS 134 Alternate Inputs.
Chapter 1.2 Introduction to C++ Programming
Process concept.
3GB3 Game Design Unity 3D Basics.
Chapter 1.2 Introduction to C++ Programming
Chapter 1.2 Introduction to C++ Programming
2D Graphics and Animations in Unity 3D
EEC-693/793 Applied Computer Vision with Depth Cameras
Frame Update, Level Representation & Graphics
Classes and Objects in Java
Chapter 5 Conclusion CIS 61.
Character Selection from a lobby in Unity
ACL SCREEN Start with Standard ACL Project Screen.
CS150 Introduction to Computer Science 1
RESPONSIVE WEB DESIGN.
EEC-693/793 Applied Computer Vision with Depth Cameras
Digital Image Formats: An Explanation
IDENTIFIERS CSC 111.
Review Game 1.
Variables ICS2O.
For Net Art Lecture 2 J Parker
Resizing for Projection
Register Variables Declaring a variable as a "register" variable is an advisory to the compiler to keep the normal location of the variable in a register,
Arrays in Java What, why and how Copyright Curt Hill.
CSE 373 Data Structures and Algorithms
More programming with "Processing"
Keeping Score Richard Gesick.
ROOM 2+ FEATURES A-CREEPIN’ BEFORE WE START: LANYARDS RECAP ALL HERE?
Week 6: Time and triggers!
Fundaments of Game Design
Tank Game Int 10 Unit 3 – Game Maker.
EEC-693/793 Applied Computer Vision with Depth Cameras
slides created by Marty Stepp
Lecture 3: G.O. architecture + Polymorphism
Deeper into the Depths: Casting, Scope, Gizmos, Layers, Self-Destruct.
Unity Game Development
Unity Game Development
So you want to be a Game Designer
Variables and Constants
Interfaces, Enumerations, Boxing, and Unboxing
Collisions with Static Objects
Presentation transcript:

Player preferences, Loading Scenes, Activating and Enabling Unity Notes Player preferences, Loading Scenes, Activating and Enabling

Review Camera size is ½ screen height and width. Images often have 100:1 pixel to unit ratio In 2D, z value is used for layering Object positions are world space for parents, object space for children Fields can be serialized rather than public Attaching BoxColliders registers objects for collision events

Player Preferences File stored on disk by unity Keep player preferences between plays It’s really a hashtable

Using preferences bool PlayerPrefs.HasKey(String key) void PlayerPrefs.SetInt(String key, int value) void PlayerPrefs.SetFloat(String key, float value) void PlayerPrefs.SetString(String key, String value) int PlayerPrefs.GetInt(String key) etc…

Don’t duplicate data Usually a bad idea to store things in 2 different places – why? Don’t re-keep data in local variable without a good reason

Loading Scenes need using statement: using UnityEngine.SceneManagement; SceneManager is static object void SceneManager.LoadScene(String sceneName);

Runtime activation GameObjects can be activated and de-activated in code: gameObject.SetActive(false); When might you want to do this? You can check status as well: bool isActive = gameObject.activeSelf;

Runtime enabling Maybe you don’t want the whole object de-activated, but you do want to enable or disable one component of the object: myComponent = GetComponent<Whatever>(); myComponent.enabled = true;