Latest Posts

Go On :: shaders, render queues and fx

{{vine //}} In which I discuss methods of focusing specific units/actors in Unity using full screen quads, render queues and Material pooling. closeup...

Read More »

invoke a method from a Unity Inspector

In a rush? Grab the code off of GitHub Have you ever wanted to call a method on one of your MonoBehaviours right from the editor? There are plenty ways to do this. You could make your own custom editor and add buttons in an OnInspectorGUI. This is recommended but annoying for one-offs. You could use my handy 5 minute custom editor. There is probably an asset store asset that is more robust tha...

Read More »

'enforcing' a Type in the Unity Editor

Let's start with a picture Download the code here what's going on here? There are two property fields that accept any MonoBehaviour. Both properties are decorated with an attribute that accepts a type (in this case an interface) as a parameter. If you populate the properties with an object that does not implement said type, the field will turn red. why not make the property an interface? This is a...

Read More »