Event Messages

This feature is only available in Inspector Gadgets Pro.

If Decorator Attributes and Inspectable Attributes aren’t able to achieve the level of customisation you want, you can add methods with specific signatures and Inspector Gadgets will call them when appropriate, much like Unity's regular event messages (such as Awake and Update):

Name Parameters Purpose
AfterInspectorGUI () Called after the regular Inspector GUI so you can add GUI elements without replacing the entire GUI.
OnInspectorGUI () Replaces the Inspector GUI so you can draw an entire custom interface.
OverridePropertyGUI (SerializedProperty property, GUIContent label) also return bool Called before drawing each SerializedProperty. The return value indicates whether you want to replace the property's regular GUI (true = you have already drawn it, false = Inspector Gadgets should draw it normally).
OnPropertyContextMenu (GenericMenu menu, SerializedProperty property) Called when opening the context menu of a particular Inspector field.