Book Image

Unity 2D Game Development Cookbook

By : Claudio Scolastici
Book Image

Unity 2D Game Development Cookbook

By: Claudio Scolastici

Overview of this book

<p>Unity is a powerful game development engine that provides rich functionalities to create 2D and 3D games.</p> <p>Unity 2D Game Development Cookbook is a practical guide to creating games with Unity. The book aims to serve the purpose of exploring problematic concepts in Unity for 2D game development, offering over 50 recipes that are easy to understand and to implement, thanks to the step-by-step explanations and the custom assets provided. The practical recipes provided in the book show clearly and concisely how to do things right in Unity. By the end of this book, you'll be near "experts" when dealing with Unity. You will also understand how to resolve issues and be able to comfortably offer solutions for 2D game development.</p>
Table of Contents (15 chapters)
Unity 2D Game Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


When building up a game, we usually start by importing the graphics assets to actually build up and prototype the gameplay.

In this specific case, we decided to begin with 3D models. Before importing the models, you should take care of bringing in the textures. Feel free to switch between Chapter 1 and Chapter 2, 2D Assets for Unity, which focuses on textures and materials. A cookbook is specifically designed to leave the readers free to access the contents in whichever order they prefer.

We assume that you have the assets to test the operations explained throughout this book; in case you don't, you can download the contents available on Packt Publishing website.

When importing models from a 3D software into Unity, there are several settings to be defined: scales, source materials and textures, rigging and animations, and many others. We will discuss the most important setting soon.

For the importing process to be fully successful, it is also important that the scene in the 3D editor is properly set. When modeling stuff with a 3D editor for a 3D engine, it is important that scales, lights (if available), and cameras match between the scenes, or your models won't fit the game levels properly.

For the recipes of this chapter, we decided to pick Maya as our reference 3D editor. We do not mean that Maya is the best software, but there are plenty of reasons for this choice. Native Maya files are supported by Unity, and the LT version of Maya allows you to perform "one-click-exporting" of Maya scenes directly into Unity (http://videos.autodesk.com/zencoder/content/dam/autodesk/www/products/autodesk-maya-lt/video/send-to-unity-fbx-export-video-1280x720.mp4).

Maya is also an industry standard for 3D artists, and it is supported by both Windows and OS X (while 3D Studio Max, for example, isn't). You can check out 3D forums to delve into the differences between 3D software. The following is a list of very popular forums to begin with: