System.Attribute
to add custom item act to Shortcut
to perform.
More...
Inherits Attribute.
Public Member Functions | |
ShortcutActAttribute (string name, int order=0, Type type=null) | |
Setup the act's menu name, order, and target type. More... | |
Public Attributes | |
readonly string | name |
The menu name, also as the act name to index the method. More... | |
readonly int | order |
The menu order. More... | |
readonly Type | type |
The type of the item target, on which this act can be performed. More... | |
System.Attribute
to add custom item act to Shortcut
to perform.
Add this to a static method to add the act name
to the Shortcut
context and settings popup menus. The method will be fired when the specified act performed. Note, generic methods, or methods of generic types are not supported. The method should have the following signature: static void PerformAct(Object asset)
.
Declaring examples below:
For compatibility, a return value will be ignored if exist:
ShortcutActAttribute | ( | string | name, |
int | order = 0 , |
||
Type | type = null |
||
) |
Setup the act's menu name, order, and target type.
name | Menu name. |
order | Menu order. |
type | Target type. |
readonly string name |
The menu name, also as the act name to index the method.
Like the editor menu, it accepts setting "Folder/ActOne" and "Folder/ActTwo" to arrange groups.
readonly int order |
The menu order.
readonly Type type |
The type of the item target, on which this act can be performed.