Introducing scripting
To take your first steps into programming, we will look at a simple example of the same functionality in both C Sharp(C#) and Javascript, the two main programming languages used by Unity developers. It is also possible to write Boo based scripts, but these are rarely used outside of those with existing experience in that language.
Note
To follow the next steps you may choose either Javascript or C#, then in the rest of this book continue with the chosen language your prefer.
To begin, click the Create button on the Project panel, then choose either Javascript or C# Script.
Your new script will be placed into the Project panel named NewBehaviourScript, and show an icon of a page with either JS or C# written on it. When selecting your new script, Unity offers a preview of what is in the script already, in the view of the Inspector, and an accompanying Edit button that when clicked will launch the script into the default script editor—Monodevelop. You can also launch a script...