EDIT: For a better solution altogether, I released my VFW for free. The framework contains a much better drawing API (which lets you write drawers for any object type) with a much better (allocation friendly) and faster GUI layout system.
Well, we made a little debugging session me and @Jamora - it’s very obvious that I have something in my project, that is making it work.
So we started out from an empty project - I tried doing the same thing ^ - it didn’t work! I got all the nasty stuff he got - and that proves it, there’s something in my other project that made it work.
Next step was to import stuff step by step, I kept importing till I reached a point where I imported my Editor folder, and suddenly I got no errors!
So now it’s definitely something in the editor folder from my old project, but what is it?
We kept deleting and deleting, util finally we figured it out!
It came down to this:
If you have a custom editor, for the MonoBehaviour
that contains an instance of the type you have the drawer for, it will work!
i.e.
public class Test : MonoBehaviour
{
public MyType type;
}
[CustomEditor(typeof(Test))]
public class TestEditor : Editor
{
// you don't even need to override OnInspectorGUI!
}
[System.Serializable]
public class MyType { }
[CustomDrawer(typeof(MyType))]
public class MyTypeDrawer : PropertyDrawer
{
public override void OnGUI(...)
{
GUILayout("WHO'S THE TOUGH GUY NOW, HUH?!");
}
}
And that’s it! 
I don’t know if that’s a bug in Unity or not, I don’t know if other people know about this, but hey, it works 
I’m not sure I have an explanation, other than: The property is being drawing inside the custom inspector of Test
?
Just thought I’d share.
Let me know if this worked for you or not.
But even if it didn’t, we could still make our own GUILayouts
- if you look into any of the GUILayout
methods, like Button
for example you’ll notice that the first thing they do, is just get the position of the button, and then call the corresponding GUI
method, in this case GUI.Button
and pass it the position - if we could get the position ourselves, then it’s a piece of cake! - Unfortunately .NET Reflector is acting funny with me at the moment, if I manage to get it running and get my idea to life, I’ll post it here as well.
I do not recommend however to ‘heavily’ depend on this ‘hack’? I should say? - Because high chances are this wasn’t intended - or maybe it was? who knows… It’s subject to change, which if it does, breaks any code that depended on it. That’s why it’s better for one to make his own GUI
wrappers.