The Renderer class

The Renderer class lists a bunch of stuff that might look like so much gibberish to you. It has these lists:

  • Variables
  • Messages sent
  • Inherited variables
  • Inherited functions
  • Inherited class functions

From that list, the only familiar word might be "functions", which we just learned are reusable bundles of code (or endlessly eatable sandwiches, if you prefer). As we write more code in this chapter, we'll come to understand what variables are. For now, focus on the things listed under the Variables section.

The Renderer class

One of the variables is called enabled. Do you remember when you wrote renderer.enabled = false;? You've already used a variable, perhaps ...

Get Unity 4.x Game Development by Example Beginner's Guide 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.