Tri-Inspector/Runtime/Attributes/EnableIfAttribute.cs

19 lines
527 B
C#
Raw Normal View History

using System;
using System.Diagnostics;
namespace TriInspector
{
2022-05-19 10:49:19 -04:00
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true)]
[Conditional("UNITY_EDITOR")]
2022-08-03 04:18:28 -04:00
public class EnableIfAttribute : DisableIfAttribute
{
public EnableIfAttribute(string condition) : this(condition, true)
{
}
public EnableIfAttribute(string condition, object value) : base(condition, value)
{
2022-08-03 04:18:28 -04:00
Inverse = true;
}
}
}