Ding!

Hopefully, a little lightbulb has appeared above your head at this point. You may be wondering what else you see in that Inspector panel that you can get your grubby mitts on through code. Let's take a quick glance at what else is in that Mesh Renderer component:

  • A checkbox labeled Cast Shadows (this is a Unity Pro feature)
  • Another checkbox labeled Receive Shadows
  • Something a little more complicated involving Materials

Unless you're some kind of whiz kid, it's unlikely that you'll figure out how to fiddle with this stuff on your own. Let's take a trip to the Unity Script Reference to see what it tells us about the Renderer class.

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.