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

Light component


What is a light? The general answer will be that it's an electromagnetic radiation visible to an eye. In Unity, light is a component that changes the brightness of the affected objects allowing them to be seen. You can add a light component to any GameObject by navigating to Add Component | Rendering | Light; although, I'll have to say that it is a rare method of doing it. Most of the time, you will be adding the lights to your scene as a separated empty GameObjects by navigating in the top menu to GameObject | Light.

The largest inconvenience of having a light attached to a non-empty GameObject is the fact that its position and rotation are tied to those of the object and you can't control it as flexibly as colliders.

Despite having multiple light types available, most of them have many parameters in common:

  • Type: This allows you to choose between light types.

  • Color: This is the color that will be emitted by the light.

  • Intensity: This controls the brightness of a light.

  • Shadow...