
A leap of faith
The first piece of code (the first lines of our script) looks like this:
function Update () { }
Click to place your cursor after the first curly bracket, and press the Enter key to make some space between the top and bottom curly braces. Press the Tab key to indent, to make your code look pretty, if the editor doesn't automatically do it for you. Then, type a single line of code so that your script looks like this:
function Update () { renderer.enabled = false; }
Note
Downloading the example code
You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.
You will notice that as you type each word in this line of code, entire drop-down lists pop open with a dizzying list of strange-looking options. This is called Code Hinting, and while it may seem annoying when you first encounter it, you'll be erecting a shrine to it by the time you have finished this book. Code hinting brings a programming language's entire dictionary to your fingertips, saving you the hassle of looking things up or misspelling special keywords.
A little asterisk ("star") appears next to your script's name whenever you have unsaved changes. Save your script by pressing Ctrl + S or Command + S on the keyboard, or by choosing File | Save from the menu. For the remainder of this book, we'll assume that you've saved any modifications that you've made to your scripts before trying them out.
