HELLO WORLD: YOUR FIRST PROGRAM CHAPTER 18 1. Topics  Hello World?  Creating a Unity Project –The Unity Project Folder  MonoDevelop: Unity's Code Editor.

Slides:



Advertisements
Similar presentations
© 2010 Delmar, Cengage Learning Chapter 1 Getting Started with Dreamweaver.
Advertisements

Using XCode © 2013 Surajit A Bose De Anza College.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
GameCamp! and Game Davis Introduction to Unity®
1 of 6 Parts of Your Notebook Below is a graphic overview of the different parts of a OneNote 2007 notebook. Microsoft ® OneNote ® 2007 notebooks are digital.
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
CS 1400 Using Microsoft Visual Studio 2005 if you don’t have the appropriate appendix.
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 ▪
1 MAKING THE LEGACY "DESKTOP" OF "WINDOWS 8" EASIER TO USE.
Beginning Programming with the Visual Studio.NET Environment.
Lesson 5: Using Tasks, Notes and the Journal
1 After completing this lesson, you will be able to: View and open folders. Open, edit, and save files. Print files. Sort files. (continued)
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
Creating a Website. Unit Objectives Plan a website Create a folder for website management Set up a website Add a folder to a website Save a web page Copy.
Microsoft Office 2013 ®® Managing Your Files. XP Objectives Explore the differences between Windows 7 and Windows 8 Plan the organization of files and.
Introduction to VB.NET Tonga Institute of Higher Education.
SE 350 – Programming Games Lecture 6: Programming with Unity Lecturer: Gazihan Alankuş Please look at the last slide for assignments (marked with TODO)
Project 3 File, Document, Folder Management, Windows XP Explorer Windows XP Service Pack 2 Edition Comprehensive Concepts and Techniques.
Several Ways to Print in Windows 98 by Ralph Godinez.
Chapter 1 Databases and Database Objects: An Introduction
DEBUGGING CHAPTER Topics  Getting Started with Debugging  Types of Bugs –Compile-Time Bugs –Bugs Attaching Scripts –Runtime Errors  Stepping.
Windows Web Xbox Mobile … and WakeUpAndCode.com.
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
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 2 The Visual Basic.NET Integrated Development Environment.
SE 320 – Introduction to Game Development Lecture 8: Animations, GUIs, Debugging and IDEs Lecturer: Gazihan Alankuş Please look at the last two slides.
Microsoft Office 2008 for Mac – Illustrated Unit C: Understanding File Management.
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.
Web Games Programming Unity Scripting Fundamentals.
UFCFS D Technologies for the Web Unity 3D: Review of Topics and Related Concepts.
Unity 5 Visual Studio Code * Asset Store * FPS * Terrain.
Learning Unity. Getting Unity
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 7 – Creating and Using Templates in a Web.
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.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Using Macros in Minitab
Microsoft Office XP Illustrated Introductory, Enhanced with Programs, Files, and Folders Working.
UFCEK-20-3Web Games Programming Unity 3D: Review of Topics Publishing for the Web.
Java Programming, Second Edition Appendix A Working with Java SDK 1.4.
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.
Adding Shortcuts Topic 8 7/28/2010. What is a Shortcut? A shortcut offers a way of doing a task more quickly such as starting a program or accessing a.
®® Microsoft Windows 7 Windows Tutorial 2 Organizing Your Files.
UFCEKU-20-3Web Games Programming Instantiating World Objects.
File and File Systems Compiled by IITG Team Need to be reorganized and reworded.
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.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Author: Loh Jianxiong Christopher Contributions: Chua Jie Sheng, Li Mengran, Peh Shao Hong, Oo Theong Siang, Tong Chun Kit, Tania Chattopadhyay.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Digital Game Design ACST 3710 Your First Unity Program 1.
Game Development with Unity3D
Dive Into® Visual Basic 2010 Express
Thanks to our Sponsors! Community Sponsor Yearly Sponsor
EEC-693/793 Applied Computer Vision with Depth Cameras
The eclipse IDE IDE = “Integrated Development Environment”
Chapter 2: The Visual Studio .NET Development Environment
EEC-693/793 Applied Computer Vision with Depth Cameras
Windows – File System There is a different file system for each hardware device The different file systems are identified at the root by an alpha character.
EEC-693/793 Applied Computer Vision with Depth Cameras
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.
1. Open Visual Studio 2008.
Introduction to Unity 2D Game Development
Getting Started with Unity
CSCI N207 Data Analysis Using Spreadsheet
EEC-693/793 Applied Computer Vision with Depth Cameras
Unity Game Development
Presentation transcript:

HELLO WORLD: YOUR FIRST PROGRAM CHAPTER 18 1

Topics  Hello World?  Creating a Unity Project –The Unity Project Folder  MonoDevelop: Unity's Code Editor  Attaching Scripts to GameObjects  Start() and Update()  GameObject Prefabs and Instantiation  The HelloWorld Project 2

Hello World?  Hello World is often the first program written by anyone learning a new programming language.  Outputs "Hello World!" to the Console 3

Hello World?  The code of HelloWorld.cs is very simple: 4

Creating a Unity Project  From the menu bar, choose File > New Project…  Choose the location for your project folder –Mac OS X Click the Set… button Navigate to the right location Type the project name into the Save As field Click the Save button –Windows Click the Browse… button Navigate to the right location Click the New Folder button and give the new folder the name of your project. Click the Select Folder button 5

Creating a Unity Project  Set up defaults for 3D  Click the Create Project or Create button  Appendix A contains detailed instructions 6

Creating a Unity Project  The Project pane shows the contents of the Assets folder inside your Unity project folder –Right-click in the Project pane and choose Reveal in Finder (or Show in Explorer) from the pop-up menu 7

MonoDevelop: Unity's Code Editor  Unity uses MonoDevelop for code editing –MonoDevelop is a separate program developed by a different team  To open MonoDevelop, double-click any C# script in your Project pane –This will launch MonoDevelop –Though the launch process takes some time  You must save a document in MonoDevelop for it to recompile and update in Unity  On Windows, Microsoft Visual Studio may be used –Instructions for this can be found online 8

MonoDevelop: Unity's Code Editor The MonoDevelop Window 9 Code Pane Classes Pane Document Outline Pane

Attaching Scripts to GameObjects 10 To work in Unity, a C# script must be attached to a GameObject

Attaching Scripts to GameObjects 11 This makes the script a component of the GameObject

Start() and Update()  You make use of Start() and Update() in the HelloWorld project –void Start() {…} Called once Called immediately before the first Update() is called –void Update() {…} Called every frame This can happen over 200 times per second! –void Awake() {…} (not used in HelloWorld, but important) Called once Called at the moment the GameObject is created Guaranteed to be called before Start() 12

GameObject Prefabs and Instantiation  A prefab is a mold from which GameObject instances can be made –Created by dragging a GameObject from the Hierarchy pane into the Project pane –Can be assigned to a script variable in the Inspector pane public GameObject gameObjectPrefab; –Then, an instance of the prefab can be created in code Instantiate( gameObjectPrefab );  This is used in HelloWorld to create thousands of instances of a Cube GameObject prefab 13

The HelloWorld Project  Output "Hello World!" to the Console pane –Once using Start() –Many times using Update() –Attach HelloWorld.cs script to Main Camera  Create a Cube prefab that reacts to gravity & physics  Instantiate an instance of the Cube prefab –Once using Start() –Many times using Update() This will create a cascade of thousands of Cube instances –Over other physically-modeled objects –Attach CubeSpawner.cs script to Main Camera 14

HelloWorld.cs 15  Note the different ways to “print” in Unity –C#’s print() function –Unity’s Debug.Log() function

CubeSpawner.cs and Main Camera attachment 16 Prefab should have Rigidbody component

The HelloWorld Project 17 The final HelloWorld scene

Chapter 18 – Summary  Hello World is a common first program to make in any new language  Unity projects are stored as many files in project folders on your hard drive  MonoDevelop is used to edit code for Unity  Scripts must be attached to GameObjects to run  Start(), Update(), and Awake() are called at different times and have different uses  GameObject prefabs can be instantiated many times 18