Getting Started with Unity 5
5/5
()
About this ebook
- Learn to create interactive games with the Unity 5 game engine
- Explore advanced features of Unity 5 to help make your games more appealing and successful
- A step-by-step guide giving you the perfect start to developing games with Unity 5
If you are a game developer interested in learning Unity 3D from scratch and becoming familiar with its core features, then this book is for you. No prior knowledge of Unity 3D is required.
Related to Getting Started with Unity 5
Related ebooks
Unity Animation Essentials Rating: 0 out of 5 stars0 ratingsUnity Game Development Blueprints Rating: 0 out of 5 stars0 ratingsBuilding an FPS Game with Unity Rating: 0 out of 5 stars0 ratingsBuilding Levels in Unity Rating: 0 out of 5 stars0 ratingsBlueprints Visual Scripting for Unreal Engine Rating: 0 out of 5 stars0 ratingsUnity from Zero to Proficiency (Intermediate): Unity from Zero to Proficiency, #3 Rating: 2 out of 5 stars2/5Unity Game Development Scripting Rating: 0 out of 5 stars0 ratingsMastering Unity Scripting Rating: 0 out of 5 stars0 ratingsBuilding an RPG with Unreal Rating: 0 out of 5 stars0 ratingsBlueprints Visual Scripting for Unreal Engine - Second Edition: The faster way to build games using UE4 Blueprints, 2nd Edition Rating: 0 out of 5 stars0 ratingsExtending Unity with Editor Scripting Rating: 0 out of 5 stars0 ratingsGameMaker Essentials Rating: 0 out of 5 stars0 ratings3D Game Design with Unreal Engine 4 and Blender Rating: 0 out of 5 stars0 ratingsMobile Game Design Essentials Rating: 0 out of 5 stars0 ratingsUnity from Zero to Proficiency (Advanced): Unity from Zero to Proficiency, #4 Rating: 0 out of 5 stars0 ratingsOuya Unity Game Development Rating: 0 out of 5 stars0 ratingsMastering Unity 5.x Rating: 0 out of 5 stars0 ratingsUnity Multiplayer Games Rating: 5 out of 5 stars5/5A Beginner's Guide to 2D Shooter Games: Beginners' Guides, #2 Rating: 0 out of 5 stars0 ratingsUnreal Engine 4 Game Development Essentials Rating: 4 out of 5 stars4/5Unity AI Programming Essentials Rating: 0 out of 5 stars0 ratingsUnity 5 for Android Essentials Rating: 4 out of 5 stars4/5Unreal Engine Game Development Cookbook Rating: 0 out of 5 stars0 ratingsMastering Oculus Rift Development Rating: 0 out of 5 stars0 ratingsSDL Game Development Rating: 0 out of 5 stars0 ratingsMastering LibGDX Game Development Rating: 0 out of 5 stars0 ratingsNGUI for Unity Rating: 0 out of 5 stars0 ratingsUnreal Engine 4 Virtual Reality Projects: Build immersive, real-world VR applications using UE4, C++, and Unreal Blueprints Rating: 0 out of 5 stars0 ratingsLearning Construct 2 Rating: 0 out of 5 stars0 ratings
Programming For You
Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5C Programming For Beginners: The Simple Guide to Learning C Programming Language Fast! Rating: 5 out of 5 stars5/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5Learn PowerShell in a Month of Lunches, Fourth Edition: Covers Windows, Linux, and macOS Rating: 5 out of 5 stars5/5Excel 101: A Beginner's & Intermediate's Guide for Mastering the Quintessence of Microsoft Excel (2010-2019 & 365) in no time! Rating: 0 out of 5 stars0 ratingsSQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Coding with JavaScript For Dummies Rating: 0 out of 5 stars0 ratingsBeginning Programming with C++ For Dummies Rating: 4 out of 5 stars4/5Python: Learn Python in 24 Hours Rating: 4 out of 5 stars4/5JavaScript All-in-One For Dummies Rating: 5 out of 5 stars5/5C# 7.0 All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsPython Data Structures and Algorithms Rating: 5 out of 5 stars5/5C All-in-One Desk Reference For Dummies Rating: 5 out of 5 stars5/5Narrative Design for Indies: Getting Started Rating: 4 out of 5 stars4/5Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5
Reviews for Getting Started with Unity 5
1 rating0 reviews
Book preview
Getting Started with Unity 5 - Dr. Edward Lavieri
Table of Contents
Getting Started with Unity 5
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Getting Jiggy with the Unity Interface
Why Unity?
Getting your hands on Unity
Projects
Layouts
Views
The Scene view
The Game view
The Hierarchy view
The Project view
The Inspector view
Transform tools
Cameras
Summary
2. Creating the Game Environment
Game design
Game look
Player objectives
Gameplay
User actions
Artificial Intelligence
End state
Terrain
Creating the terrain
Adding mountains
Adding a river
Textures
Additional environmental features
Natural bridge
Planting trees
Water
Creating the sky
Summary
3. Working with Assets
Assets
Asset packages
Unity Asset Store
Adding assets to your game
Using the Unity Asset Store
Importing a custom asset package
Importing the game characters
Importing the buildings
Using Blender to create assets for your game
Summary
4. Animating the Game Characters
Animation basics
Character controllers
First person controller
Creating a third person controller
Animating player characters
Little farmer Colt
Old farmer character
Farm animals
Previewing animations
Creating animation clips
Summary
5. Scripting the Game
C# programming primer
Syntax
Naming conventions
Class, function, and method names
Camel case
Abbreviations
Special characters
Data types
Using MonoDevelop
Scripting with C# in Unity
Start and update functions
Scripting example
Unity scripting assets
Scripting our game
Script planning
Gathering corn
Gathering water
Feeding piglets
Feeding baby chicks
Feeding pigs
Feeding adult chickens
Data requirements
All about the pigs
Chicks and chickens
Corn and water
Initializing our data
Selective scripts
Selective script – global variables
Selective script – evoking the take animation
Selective script – feeding the farm animals
Organizing scripts
Summary
6. Adding a Graphical User Interface
An overview of GUI
Functions of a GUI
Feedback
Control
Feedback and Control
Game Layers
Unity 5's UI system
Canvas
Render mode
Creating a GUI
HUD
Creating an HUD
Mini-maps
Creating a mini-map
Game navigation
Summary
7. Polishing and Optimizing the Game
Sight and sound
Unity's sound capabilities
Audio listener
Audio clips
Audio source
Implementing sound effects
Visual effects
Spotlight orb with halo effect
Casting shadows
Trail rendering
Rendering options
The Profiler window
Rendering optimization
Imposing limits
Baking images
Optimizing scripts
Summary
8. What's Next?
Improving our game
Audio
Visual effects
Functionality
Levels
Project management
Unity workflow
Art and animation
Scripts
Other assets
Scaling projects
Development concepts
Cross-platform considerations
Plugins
Attribution
Advanced topics
Particle systems
Inventory control systems
Dialog systems
Summary
Index
Getting Started with Unity 5
Getting Started with Unity 5
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: May 2015
Production reference: 1260515
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-831-6
www.packtpub.com
Credits
Author
Dr. Edward Lavieri
Reviewers
Maxim Jankov
Adam Larson
Michael E. Miles
Commissioning Editor
Ashwin Nair
Acquisition Editor
Nikhil Karkal
Content Development Editor
Shweta Pant
Technical Editors
Rosmy George
Ankita Thakur
Copy Editors
Sonia Michelle Cheema
Ameesha Green
Project Coordinator
Shipra Chawhan
Proofreaders
Stephen Copestake
Safis Editing
Indexer
Monica Ajmera Mehta
Graphics
Sheetal Aute
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta
About the Author
Dr. Edward Lavieri is a veteran game designer and developer with a strong academic background. He earned a doctorate of computer science from Colorado Technical University, and three masters of science degrees in management information systems from Bowie State University. His formal education includes instructional design (from Capella University) and operations management (from the University of Arkansas), demonstrating his passion for academic pursuits. He has developed and taught computer-related courses since 2002 and currently teaches at Southern New Hampshire University. Edward retired from the US Navy after 25 years as an intelligence specialist and command master chief.
As the founder and creative director of three19, a software design and development studio, Edward is constantly developing software. He uses Unity as one of his primary game development tools. He focuses on developing adaptive learning systems, educational games, and mobile apps.
Edward authored Adaptive Learning for Educational Game Design, CreateSpace Independent Publishing Platform, LiveCode Mobile Development HOTSHOT, Packt Publishing, LiveCode Mobile Development Cookbook, Packt Publishing, Software Consulting: A Revolutionary Approach, CreateSpace Independent Publishing Platform, and was the technical editor of Excel Formulas and Functions for Dummies, Ken Bluttman, Wiley Publishing. He has also developed numerous college courses, involving computer science and information systems.
I would like to thank Colt for always bringing a smile to my face and heart. To Noel and Josh, thank you for being in my life and creating Colt. I love all three of you. My deepest appreciation and love goes to Brenda. You are my world and let me tell you, I do love living in it. I would like to express my gratitude to Fuel So Good Coffee Roasters for fueling my writing and game development. I would also like to thank the expert team at Packt Publishing, including Harshit, Owen, Govindan, Shweta, Nikhil, the reviewers, technical editors, proofreaders, indexers, and the marketing team. It is a pleasure to have worked with such an amazing team.
About the Reviewers
Adam Larson has been programming since 2001. His first venture into the game industry started as a programmer, working on digital downloadable titles for Xbox Live Arcade. Since then, he has worked on titles on every modern platform. Adam discovered Unity about 5 years ago, and has been a huge advocate of it as it has grown into the powerhouse it is today.
He currently manages Zymo Entertainment, a small start-up located near Green Bay, Wisconsin. The company focuses on business applications using Unity 3D as well as video games.
I really want to thank my coworkers at Zymo Entertainment, as they've let me bounce a few ideas off of them.
Michael E. Miles purchased his first computer in 1979 and since then, he has been hooked on to programming, specifically at the machine language level. The Z80 (TRS80) and 6502 (Apple II) microprocessors were top-of-the-line processors at that time, and he began programming by creating custom commands for each of the BASIC languages of these machines. As the graphic capabilities of PCs increased, his interest in graphics and animation took over with the introduction of AutoCAD. Combining his love for computer graphics and aircrafts, he became an aerospace manufacturing engineer, creating visual/animated fabrication and installation instructions for the manufacture of aircraft structures. To formulate these instructions, he frequently uses CATIA, Blender, After Effects, and has recently been incorporating game engines into his workflows, specifically, Unity and Unreal Engine 4. Michael currently works for various aerospace companies in the aerospace and defense industry as a contract manufacturing engineer, and is originally from Seattle, Washington.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Free access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Preface
With the pervasiveness of games and the use of gamification in nearly every industry, the desire to discover how to use state of the art development software has never been so great. There is an increasing number of software tools available to help developers create amazing games for consoles, the Web, desktop computers, and mobile devices. Game engines are among the most powerful of these tools available. The Unity 3D game engine is one of the elite game engines. It has been used to create popular 2D and 3D games by large game studios and indie developers. With a free version available, and the release of Unity 5, the time has never been better to start using Unity.
Getting Started with Unity 5 covers one of the most popular game engines available. This book will guide you through the entire process of creating a 3D game, from downloading the Unity game engine to publishing your game. You will enjoy having complete coverage of exciting topics including player-controlled characters and animation. Whether you are just getting started as a game developer or have experience with Unity or other game engines, this book will provide you with a guided tour of developing games with Unity 5. With clear explanations, tips, and ample screenshots, you will be provided with detailed steps to develop your