This repository has been archived on 2024-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
snakeinabox/Assets/NaughtyAttributes/Scripts/Editor/PropertyGroupers/BoxGroupPropertyGrouper.cs
2020-07-09 11:41:01 -07:00

24 lines
586 B
C#

using UnityEditor;
using UnityEngine;
namespace NaughtyAttributes.Editor
{
[PropertyGrouper(typeof(BoxGroupAttribute))]
public class BoxGroupPropertyGrouper : PropertyGrouper
{
public override void BeginGroup(string label)
{
EditorGUILayout.BeginVertical(GUI.skin.box);
if (!string.IsNullOrEmpty(label))
{
EditorGUILayout.LabelField(label, EditorStyles.boldLabel);
}
}
public override void EndGroup()
{
EditorGUILayout.EndVertical();
}
}
}