Class ButtonAttribute
Attribute to specify a inspector Button before or after a field, property or method.
[AttributeUsage(AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field, Inherited = true, AllowMultiple = true)]
public class ButtonAttribute : Attribute
- Inheritance
-
ButtonAttribute
Constructors
ButtonAttribute(string, bool)
public ButtonAttribute(string text = null, bool displayAfter = false)
Parameters
ButtonAttribute(string, string, bool)
Specify a inspector Button before or after a field or property
public ButtonAttribute(string text, string methodName, bool displayAfter = false)
Parameters
textstringText to be displayed on the button
methodNamestringName of the method to be called when the button is clicked
displayAfterboolWhether the button should be displayed after the field or property
Properties
DisplayAfter
public bool DisplayAfter { get; }
Property Value
IsMethod
public bool IsMethod { get; }
Property Value
MethodName
public string MethodName { get; }
Property Value
Text
public string Text { get; }