Class TimelineShortcutAttribute
Use this attribute to make an action work with the shortcut system.
Implements
Inherited Members
Namespace: UnityEditor.Timeline.Actions
Assembly: solution.dll
Syntax
public class TimelineShortcutAttribute : ShortcutAttribute, _Attribute
Examples
TimelineShortcutAttribute needs to be added to a static method.
public class TestAction : TimelineAction
{
public override ActionValidity Validate(ActionContext _) { return ActionValidity.Valid; }
public override bool Execute(ActionContext _)
{
Debug.Log("Action executed.");
return true;
}
[TimelineShortcut("Test Action", KeyCode.K, ShortcutModifiers.Shift | ShortcutModifiers.Alt), UsedImplicitly]
public static void HandleShortCut(ShortcutArguments args)
{
Action.InvokeWithSelected<TestAction>();
}
}
Constructors
Name | Description |
---|---|
TimelineShortcutAttribute(string, KeyCode, ShortcutModifiers) | TimelineShortcutAttribute Constructor |