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 2020

You're reading from   Learning C# by Developing Games with Unity 2020 An enjoyable and intuitive approach to getting started with C# programming and Unity

Arrow left icon
Product type Paperback
Published in Aug 2020
Publisher Packt
ISBN-13 9781800207806
Length 366 pages
Edition 5th 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 (16) Chapters Close

Preface 1. Getting to Know Your Environment 2. The Building Blocks of Programming FREE CHAPTER 3. Diving into Variables, Types, and Methods 4. Control Flow and Collection Types 5. Working with Classes, Structs, and OOP 6. Getting Your Hands Dirty with Unity 7. Movement, Camera Controls, and Collisions 8. Scripting Game Mechanics 9. Basic AI and Enemy Behavior 10. Revisiting Types, Methods, and Classes 11. Introducing Stacks, Queues, and HashSets 12. Exploring Generics, Delegates, and Beyond 13. The Journey Continues 14. Pop Quiz Answers 15. Other Books You May Enjoy

Creating lights

By default, every scene comes with a Directional Light component to act as a main source of illumination, but lights can be created in the hierarchy like any other GameObject. Even though the idea of controlling light sources might be new to you, they are objects in Unity, which means they can be positioned, scaled, and rotated to fit your needs:

Let's take a look at some examples of realtime light objects and their performance:

  • Directional lights are great for simulating natural light, such as sunshine. They don't have an actual position in the scene, but their light hits everything as if it's always pointed in the same direction. 
  • Point lights are essentially floating globes, sending light rays out from a central point in all directions. These have defined positions and intensities in the scene.
  • Spotlights send light out in a given direction, but they are locked in by their angle. Think of these as spotlights or floodlights in the real...
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 €18.99/month. Cancel anytime