If you ever find yourself designing an editor window and feel your custom inspector property needs a tooltip, this could come in handy:
public void GenerateTooltip(string text)
{
var propRect = GUILayoutUtility.GetLastRect();
GUI.Label(propRect, new GUIContent("", text));
}
Use it after the property you wish to add a tooltip to (I’m using a LayerMask in this example):
LayerMask groundLayer = EditorGUILayout.MaskField("Ground Detection Layer"), InternalEditorUtility.LayerMaskToConcatenatedLayersMask(animal.groundLayer), InternalEditorUtility.layers);
GenerateTooltip("The layer(s) this animal can walk on.");
Before:

After:

You must be logged in to post a comment.