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 ...

Get Unity 3.x Game Development Essentials 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.