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

Creating materials


As we said, materials are the skin of a model and provide its distinctive look. In the following recipe, we will create two materials that show the difference between a diffuse and transparent material.

Getting ready

As we add an entirely new type of asset to our project in this recipe (didn't we tell you that we were going to create many?), we need to create a folder to store our materials. Open Unity and get ready to follow the instructions of the next recipe!

How to do it...

  1. From the Project panel, select the Assets folder, then click anywhere and select Create | Folder, as shown in the following screenshot:

  2. Name the folder Materials, then double-click to open it.

  3. Right-click anywhere on the panel and select Create | Material, as shown in the following screenshot:

  4. Name the material as filled, then repeat this operation to create another material and name it Transparent. At this point, you should have two gray materials in your Materials folder, one named filled and the other...