This tutorial explains how to create custom material inspectors for your shaders in Unity 5.
This is a tutorial for Unity 5: Unity 4 used
MaterialEditor (legacy documentation here) to customise a material’s inspector. That is now deprecated; you should use the new
ShaderGUI (documentation here) instead.
Despite Unity3D being such an advanced framework, I am sometimes puzzled by its lack of basic features. Especially when working with 2D games, the lack of a proper snap to grid option is simply crazy. Luckily, Unity3D allows to extend its basic interface to add new behaviours. This post will explain how to add a customisable snap to grid option to your objects. Two different implementations are presented; the first one, despite being more complicated, could be used a good starting point to further extend and customise the inspector.