From e846c64d6f927879cb8a095e62d773a8d7b3c9f4 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 15 Oct 2020 07:24:10 +0800 Subject: *ability system --- .../Plugins/AdvancedInspector/Attributes/Space.cs | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Assets/Plugins/AdvancedInspector/Attributes/Space.cs (limited to 'Assets/Plugins/AdvancedInspector/Attributes/Space.cs') diff --git a/Assets/Plugins/AdvancedInspector/Attributes/Space.cs b/Assets/Plugins/AdvancedInspector/Attributes/Space.cs new file mode 100644 index 00000000..02972663 --- /dev/null +++ b/Assets/Plugins/AdvancedInspector/Attributes/Space.cs @@ -0,0 +1,48 @@ +using System; + +namespace AdvancedInspector +{ + /// + /// Add a space after the current fields. + /// + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] + public class SpacingAttribute : Attribute + { + private int before = 0; + + /// + /// Size of the space to add before the item. + /// Default is 0. + /// + public int Before + { + get { return before; } + set { before = value; } + } + + private int after = 0; + + /// + /// Size of the space to add after the item. + /// Default is 1. + /// + public int After + { + get { return after; } + set { after = value; } + } + + public SpacingAttribute() { } + + public SpacingAttribute(int after) + { + this.after = after; + } + + public SpacingAttribute(int before, int after) + { + this.after = after; + this.before = before; + } + } +} \ No newline at end of file -- cgit v1.1-26-g67d0