Book Image

Building Levels in Unity

By : Volodymyr Gerasimov
Book Image

Building Levels in Unity

By: Volodymyr Gerasimov

Overview of this book

Table of Contents (17 chapters)
Building Levels in Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
4
Dealing with Basic Animations
Index

What are Materials?


Objects are rendered in Unity with the help of Shaders: chunks of complex code that can be created in Unity's MonoDevelop. However, there is a much easier way to work with Shaders, and that's through Materials. Materials allow the adjustment of properties and assignment of assets to Shaders without any programming knowledge.

Materials in Unity

Upon importing assets earlier, you probably noticed that Unity also created a folder called Materials in each asset folder. By default, each GameObject should have a Material assigned to it—if it doesn't it will be rendered pink, just like we've witnessed at the beginning of this chapter when tried to recreate primitives with components. During asset import, Unity used the name of the Shader assigned to the assets and gave it to the newly generated Material, which was automatically assigned to imported object; however, it didn't assign textures to both of the materials but only to the Bush_Color. There are three reasons why this could...