Book Image

Mastering Unity 5.x

By : Alan Thorn
Book Image

Mastering Unity 5.x

By: Alan Thorn

Overview of this book

Mastering Unity 5.x is for developers wishing to optimize the features of Unity 5.x. With an in-depth focus on a practical project, learn all about Unity architecture and impressive animation techniques. With this book, produce fun games with confidence.
Table of Contents (16 chapters)
Mastering Unity 5.x
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Getting started with lightmapping


To start Baking Scene lighting, we'll first need to activate Lightmap UVs for the environment meshes and then position some lights in the scene where appropriate. To activate Lightmap UVs, select all environment meshes in the Project panel and enable Generate Lightmap UV from the object Inspector. Then click on Apply. This method is useful for generating a second UV channel when one doesn't already exist. This defines how lighting is baked to the lightmap texture. Unity applies an auto-unwrap projection using settings from the Advanced roll out. If, by contrast, your own meshes already have a custom, second channel, then you can use this channel instead for Lightmap UVs simply by disabling Generate Lightmap UVs.

Configuring Lightmap UVs

Note

For meshes with two UV channels, you can enable Swap UVs from the object Inspector to switch channel order, if needed. This makes the second channel the primary, and the first channel the secondary. The primary channel...