module-inspector/Runtime/AccessModifiers/HideMethod.cs

30 lines
745 B
C#

using System;
using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class HideMethod : AccessModifierMethodAttribute
{
public readonly string fieldName;
public readonly bool useFieldValue;
public readonly object fieldValue;
[Preserve]
public HideMethod()
{
}
public HideMethod(string fieldName)
{
this.fieldName = fieldName;
}
public HideMethod(string fieldName, object fieldValue)
{
this.fieldName = fieldName;
this.fieldValue = fieldValue;
useFieldValue = true;
}
}
}