Unity 3.x Game Development by Example Beginner's Guide
上QQ阅读APP看书,第一时间看更新

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 Language Reference to see what it tells us about the Renderer class.