How do I make a header using Unity Editor?

I have searched for information but I’m not getting an answer - how do I make a header for my custom inspector using Unity Editor?

In MonoBehavior I can use [Header(“Text”)], but this doesn’t seem to work in Editor. I just want a bold and more prominent header for sections in my inspector than the simple label field.

Does anyone know how to do this?

I’m thinking you can use rich text strings pretty much anywhere in the inspector window but I haven’t tried it.

Is that maybe a job for GUILayout.Label(“text here”)…?

Got it.

You have to use EditorStyles.* to get the bold style when using Editor.

Example
EditorGUILayout.LabelField("Movement Settings", EditorStyles.boldLabel);

Thank you both!

15 Likes