26 lines
560 B
C#
26 lines
560 B
C#
using System;
|
|
|
|
namespace CustomAttributes
|
|
{
|
|
/// <summary>
|
|
/// Íàæàòèå íà êíîïêó â ðåäàêòîðå
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Method)]
|
|
public class EditorButtonAttribute : Attribute
|
|
{
|
|
/// <summary>
|
|
/// Button text
|
|
/// </summary>
|
|
public string name;
|
|
|
|
/// <summary>
|
|
/// Add Button to Inspector
|
|
/// </summary>
|
|
/// <param name="name">Button text</param>
|
|
public EditorButtonAttribute(string name)
|
|
{
|
|
this.name = name;
|
|
}
|
|
}
|
|
}
|