Programming Introduction

From Unify Community Wiki
Jump to: navigation, search

Contents

Synopsis

This book is a beginners guide to programming using Unity. It will be concise and cover most of the basics of programming while hopefully giving you enough of an understanding to be able to figure out and use other documentation (such as the Unity Docs). The tools used will be the C# language, Unity, and MonoDevelop (if you have Windows and Visual Studio you could use that as well). I hope you enjoy it.

Languages & Compilers

The languages used by Unity are all .NET based languages on Mono. A .NET based language for Mono is one that can be compiled to pure IL (Intermediate Language). The languages currently supported by Unity are JavaScript, C#, and Boo.

Now if I lost you at compiled and IL... hold on. A compiler is a program that takes code and converts it into machine code (less human readable). IL is just a generic language that is platform independent, but harder to read and manage by coders. When a .NET program is run (executed), the generic language then gets translated to machine native code. This is pretty much the same as Java. Java and .NET are just platform independent platforms.

Getting Started

The first thing to do before we even start to learn is to have the right tools. Unity has a built in C# compiler, but there may be some cases when you might want to be able to do more, which will be explained later. For now, just go ahead and download Mono with MonoDevelop, which we'll use in some of our examples.

References

Here are some useful references that will help you along the way as a supplement to the material here, so you may want to bookmark them for future use.

C#

Mono C# Compiler
C# Keywords
C# Operators
C# Types Reference

.NET

Mono Documentation
Microsoft Documentation


Programming Index : Next Chapter

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox