Class MenuEntryAttribute
Use this attribute to add a menu item to a context menu. Used to indicate path and priority that are auto added to the menu (examples can be found on this page).
Implements
Inherited Members
Namespace: UnityEditor.Timeline.Actions
Assembly: Unity.Timeline.Editor.dll
Syntax
[AttributeUsage(AttributeTargets.Class)]
public class MenuEntryAttribute : Attribute, _Attribute
Remarks
Unlike Menu item, MenuEntryAttribute doesn't handle shortcuts in the menu name. See TimelineShortcutAttribute.
Examples
Constructors
MenuEntryAttribute(string, int)
Constructor for Menu Entry Attribute to define information about the menu item for an action.
Declaration
public MenuEntryAttribute(string path = null, int priority = 9000)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | Path to the menu. If there is a "/" in the path, it will create one (or multiple) submenu items. |
| int | priority | Priority to decide where the menu will be positioned in the menu. The lower the priority, the higher the menu item will be in the context menu. |