24 lines
655 B
C#
24 lines
655 B
C#
using System;
|
|
|
|
namespace Module.Inspector
|
|
{
|
|
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
|
public sealed class DisableField : AccessModifierPropertyAttribute
|
|
{
|
|
public readonly string fieldName;
|
|
public readonly bool useFieldValue;
|
|
public readonly object fieldValue;
|
|
|
|
public DisableField(string fieldName)
|
|
{
|
|
this.fieldName = fieldName;
|
|
}
|
|
|
|
public DisableField(string fieldName, object fieldValue)
|
|
{
|
|
this.fieldName = fieldName;
|
|
this.fieldValue = fieldValue;
|
|
useFieldValue = true;
|
|
}
|
|
}
|
|
} |