Tri-Inspector/Runtime/Attributes/PropertySpaceAttribute.cs

25 lines
701 B
C#
Raw Normal View History

2021-12-07 10:20:36 -05:00
using System;
using System.Diagnostics;
namespace TriInspector
{
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method |
AttributeTargets.Class | AttributeTargets.Struct)]
[Conditional("UNITY_EDITOR")]
2023-03-11 16:18:57 -05:00
public class PropertySpaceAttribute : Attribute
2021-12-07 10:20:36 -05:00
{
public float SpaceBefore { get; set; }
public float SpaceAfter { get; set; }
public PropertySpaceAttribute()
{
SpaceBefore = 7;
}
2021-12-07 10:20:36 -05:00
public PropertySpaceAttribute(float spaceBefore = 0, float spaceAfter = 0)
{
SpaceBefore = spaceBefore;
SpaceAfter = spaceAfter;
}
}
}