CHAPTER 20

VARIABLES AND COMPONENTS

This chapter introduces you to many of the variable and component types used throughout Unity C# programming. By the end of the chapter, you will understand several common types of C# variables and some important variable types that are unique to Unity.

This chapter also introduces you to Unity's GameObjects and components. Any object in a Unity scene is a GameObject, and the components that a GameObject contains enable everything from the positioning of a GameObject to physics simulation, special effects, displaying a 3D model on screen, character animation, and more.

Introducing Variables

To recap a bit of Chapter 18, "Introducing Our Language: C#," a variable is just a name that can be defined to be equal ...

Get Introduction to Game Design, Prototyping, and Development: From Concept to Playable Game with Unity and C#, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.