21 lines
482 B
C#
21 lines
482 B
C#
|
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;
|
|||
|
}
|
|||
|
}
|