2 using System.Collections.Generic;
4 using System.Text.RegularExpressions;
13 [CustomPropertyDrawer(typeof(HeaderAttribute))]
14 public class CustomHeaderDrawer : DecoratorDrawer
16 public override float GetHeight()
18 return (MRTKEditor.ShowCustomEditors && MRTKEditor.CustomEditorActive) ? 0f : 24f;
21 public override void OnGUI(Rect position)
23 if (headerStyle == null)
25 headerStyle =
new GUIStyle(EditorStyles.boldLabel);
26 headerStyle.alignment = TextAnchor.LowerLeft;
30 if (MRTKEditor.ShowCustomEditors && MRTKEditor.CustomEditorActive)
36 GUI.Label(position, (base.attribute as HeaderAttribute).header, headerStyle);
39 private static GUIStyle headerStyle = null;