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 ShortcutAction : 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)]
public static void HandleShortCut(ShortcutArguments args)
{
Invoker.InvokeWithSelected<ShortcutAction>();
}
}
Constructors
Name | Description |
---|---|
TimelineShortcutAttribute(string, KeyCode, ShortcutModifiers) | TimelineShortcutAttribute Constructor |