A leap of faith

The first piece of code (the first line of our Script) looks like this:

#pragma strict

What on Earth does that mean? We've been hit with confusing nerd talk right out of the gate. The simple explanation for this line is that it makes writing your code more fussy, but your code runs faster. We'll learn what that's all about later; for now, turn your attention further down to the Start function:

function Start () {
}

Click to place your cursor after the first curly brace, 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:

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.