Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning C# by Developing Games with Unity 2019

You're reading from   Learning C# by Developing Games with Unity 2019 Code in C# and build 3D games with Unity

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher Packt
ISBN-13 9781789532050
Length 342 pages
Edition 4th Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Harrison Ferrone Harrison Ferrone
Author Profile Icon Harrison Ferrone
Harrison Ferrone
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Section 1: Programming Foundations and C# FREE CHAPTER
2. Getting to Know your Environment 3. The Building Blocks of Programming 4. Diving into Variables,Types, and Methods 5. Control Flow and Collection Types 6. Working with Classes, Structs, and OOP 7. Section 2: Scripting Game Mechanics in Unity
8. Getting Your Hands Dirty with Unity 9. Movement, Camera Controls, and Collisions 10. Scripting Game Mechanics 11. Basic AI and Enemy Behavior 12. Section 3: Leveling Up Your C# Code
13. Revisiting Types, Methods, and Classes 14. Exploring Generics, Delegates, and Beyond 15. The Journey Continues 16. Completed Game Files 17. Supplementary Classes 18. Pop Quiz Answers 19. Other Books You May Enjoy

Lighting basics

Lighting in Unity is a broad topic, but it can be boiled down into two categories: realtime and precomputed. Both types of lights take into account properties such as the color and intensity of the light, as well as the direction it is facing in the scene; the difference is how the Unity engine computes how the lights act.

Realtime lighting is computed every frame, meaning that any object that passes in its path will cast realistic shadows and generally behave like a real-world light source. However, this can significantly slow down your game and cost an exponential amount of computing power, depending on the number of lights in your scene. Precomputed lighting, on the other hand, stores the scene's lighting in a texture called a lightmap, which is then applied, or baked, into the scene. While this saves computing power, baked lighting is static, meaning it doesn't react realistically or change when objects move in the scene.

There is...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime