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 is going to be a small collection of Unity C# tutorials focusing on editor scripting.
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
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.
- 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 use an attribute and a property drawer to customize how lists are shown in the editor.
This tutorial shows how to write your own custom editor and manage a dynamic mesh in edit mode.
- Old Star
This is an old tutorial about editor scripting, for those who still use Unity 3.
Countdown to Next Tutorial
I am currently updating the editor tutorials to Unity 4.3.
I will create another tutorial days from now, which would be .
Don't want to wait so long? You can help! Donate, and the countdown goes faster. So you can either wait and
get it for free after a long time, or donate and everyone gets it sooner. Time, or money. It's your choice.
For each dollar (USD) that gets donated, the counter decreases by one day.
Each euro that gets donated decreases the counter by 1.35 days.
$1 == 1 day
€1 == 1.35 days
I update the countdown reduction every few days, so the effect of your donation won't be immediately visible.
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.
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
- 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.
- Why such a long countdown?
I enjoy making these tutorials, but it requires a lot of time. Unfortunately, I can't spend much of my time
on creating tutorials, because I need it for other stuff, like making a living and having a life. Donations allow
me to claim some of that time for tutorial work.