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

Setting materials' names in Maya


When Unity imports a model, it also imports the materials linked to the model in the 3D editor. By default, the materials are named based on the names of the textures used in the 3D editor to build them.

If you remember from the previous chapter, upon importing a model into Unity, we set an option in the Model tab to pick material names from a model's materials, instead of the texture names. Refer to the following screenshot to checkout what we did in Chapter 1, Importing 3D Models and Animations:

We adopt this solution because it helps keep our project clean and has each asset named correctly. As our goal is to have the materials named with a meaningful convention that can help us keep materials and their textures well separated, in the following recipe, we'll show you how to add custom names to materials in Maya, to be exported into Unity.

Getting ready

For this recipe, we need a textured model to be opened in Maya. Use your own models or the ones we have provided...