mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 08:18:49 -05:00
25 lines
653 B
C#
25 lines
653 B
C#
using System;
|
|
using System.Diagnostics;
|
|
|
|
namespace TriInspector
|
|
{
|
|
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true)]
|
|
[Conditional("UNITY_EDITOR")]
|
|
public class HideIfAttribute : Attribute
|
|
{
|
|
public HideIfAttribute(string condition) : this(condition, true)
|
|
{
|
|
}
|
|
|
|
public HideIfAttribute(string condition, object value)
|
|
{
|
|
Condition = condition;
|
|
Value = value;
|
|
}
|
|
|
|
public string Condition { get; }
|
|
public object Value { get; }
|
|
|
|
public bool Inverse { get; protected set; }
|
|
}
|
|
} |