Learn C# scripting in Unity

Are you just starting with Unity 4 and want to learn how to program in C#? Are you a veteran that finally wants to do some serious scripting? Check out these tutorials!
This tutorial introduces you to Unity 4 and C# scripts. You will create a simple clock that always shows the current time.
This tutorial introduces you to more advanced C# concepts, including arrays, loops, and delegates. You will create a collection of increasingly complex graphs, from a simple line to a tiny voxel system.
This tutorial is about creating a very simple endless 2D side-scroller. It involves physics, object queues, a GUI, user input, and a simple event manager.
Constructing a Fractal
Use recursion, a coroutine, and randomization to grow your own 3D fractal.
Generate your own random maze, then walk around in it.
Curves and Splines
This tutorial will take you from creating a simple line all the way to editing your own Beziér splines.
In this tutorial you will create your own procedural texture, filling it with pseudorandom noise.


This is a small collection of Unity C# tutorials focusing on editor scripting.
Custom Data
This tutorial shows how to create a custom data type and how to write a property drawer for it.
Custom List
This tutorial shows how to create custom editors and list visualizations.
This tutorial shows how to manage a dynamic mesh in edit mode and support WYSIWYG editing.
Old Star
This is an old tutorial about editor scripting, for those who still use Unity 3.

Help Me Make More Tutorials!

I have just launched a Patreon page, where you can support me by becoming a patron of the tutorial arts!

You can also make a one-time donation to show your appreciation for my work. Thanks!

Questions & Answers

Why text and not video tutorials?
As these tutorials are about writing code, it seems natural to use text. Understanding the code might require a lot of jumping back and forth, pausing, looking things up, experimenting, and so forth, all at your own pace. I think text is more convenient than video for this.

Also, video tutorials seem to be proliferating and I didn't want those that prefer text to be left out in the cold.

Why C# and not JavaScript?
Compared to Javascript, C# has a stricter and more verbose syntax. I think this is a feature if you really want to understand what you are doing. Going from strict to lax later is easy, the other way around not so much.

Also, C# in Unity is the real thing. With very few exceptions, it is exactly like C# would be in any other .NET or Mono project. Almost all online documentation about C# is useful and all standard libraries are available. This is not really true for Unity's JavaScript, which is actually UnityScript.

Why not Boo?
It's the least used option of the three available languages. Considering the available information for the other two, I wouldn't learn Boo as my first programming language.