using System; namespace AdvancedInspector { /// /// Allow to change the style of an field item. /// [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Method)] public class StyleAttribute : Attribute { private string style = ""; /// /// Name of the style to use. /// Must be findable by GUI.skin.Find() /// public string Style { get { return style; } set { style = value; } } private bool label = true; /// /// Force or prevent the field's label from being displayed. /// public bool Label { get { return label; } set { label = value; } } public StyleAttribute(string style) : this(style, true) { } public StyleAttribute(string style, bool label) { this.style = style; this.label = label; } } }