Add HorizontalLine to Title attribute

This commit is contained in:
VladV 2023-03-12 01:32:53 +04:00
parent abcd8b1d18
commit ec71246cbd
2 changed files with 6 additions and 1 deletions

View File

@ -63,7 +63,11 @@ namespace TriInspector.Drawers
var title = _titleResolver.GetValue(property, "Error");
GUI.Label(titleRect, title, EditorStyles.boldLabel);
EditorGUI.DrawRect(lineRect, Color.gray);
if (Attribute.HorizontalLine)
{
EditorGUI.DrawRect(lineRect, Color.gray);
}
next.OnGUI(contentRect);
}

View File

@ -8,6 +8,7 @@ namespace TriInspector
public sealed class TitleAttribute : Attribute
{
public string Title { get; }
public bool HorizontalLine { get; set; } = true;
public TitleAttribute(string title)
{