using UnityEngine; namespace EditorAttributes { /// /// Attribute to display the specified fields in a foldout /// public class FoldoutGroupAttribute : PropertyAttribute { public string GroupName { get; private set; } public bool DrawInBox { get; private set; } public string[] FieldsToGroup { get; private set; } /// /// Attribute to display the specified fields in a foldout /// /// The name of the group /// The name of the fields to group public FoldoutGroupAttribute(string groupName, params string[] fieldsToGroup) { FieldsToGroup = fieldsToGroup; GroupName = groupName; DrawInBox = false; } /// /// Attribute to display the specified fields in a foldout /// /// The name of the group /// Draw the fields in the group in a nice box /// The name of the fields to group public FoldoutGroupAttribute(string groupName, bool drawInBox, params string[] fieldsToGroup) { FieldsToGroup = fieldsToGroup; GroupName = groupName; DrawInBox = drawInBox; } } }