hellbound/Assets/Scripts/Core/Attributes/CustomButtonAttribute.cs

21 lines
482 B
C#
Raw Normal View History

2021-11-26 11:16:25 +03:00
using System;
[AttributeUsage(AttributeTargets.Method)]
public class CustomButtonAttribute : Attribute
{
public enum ButtonEnableMode
{
Always,
Play,
Editor
}
public string Text { get; private set; }
public ButtonEnableMode EnableMode { get; private set; }
public CustomButtonAttribute(string text = null, ButtonEnableMode enableMode = ButtonEnableMode.Always)
{
Text = text;
EnableMode = enableMode;
}
}