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