Category Archives: Unity

Delegates, events, lambdas and all things callbacky! (Part 2)

Part two of my delegatey thing begins with lambdas, as promised. Lambdas are basically a shorter form of anonymous functions than the delegate keyword version. A few quick examples: The first one takes one parameter and calls Debug.Log on it. … Continue reading

Posted in C#, Unity | 1 Comment

Delegates, events, lambdas and all things callbacky! (Part 1)

Callbacks… are awesome. Really awesome. You just won’t believe how vastly hugely mindboggingly awesome they are… Ahem. Anyway, I get asked a lot how to do callbacks, or how to do things which scream callbacks to me, so today I’m … Continue reading

Posted in C#, Unity | 5 Comments

Sane Data Encapsulation

So, you start up your brand new copy of Unity, and start tapping away, and MAGIC! Public variables show up in the editor. Fast forward a few months, or even years, and you’re probably still using public variables everywhere, or … Continue reading

Posted in C#, Unity, UnityScript | 4 Comments

Extension Methods

My first real post is going to be about extension methods. While they’re fairly normal to see in the .NET development world, I tend not to see them much when it comes to Unity, so here’s my quick primer on … Continue reading

Posted in C#, Unity | 2 Comments