Class TimelineShortcutAttribute
Use this attribute to make an action work with the shortcut system.
구현
상속된 멤버
네임스페이스: UnityEditor.Timeline.Actions
어셈블리: solution.dll
구문
public class TimelineShortcutAttribute : ShortcutAttribute, _Attribute
예
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>();
}
}
생성자
이름 | 설명 |
---|---|
TimelineShortcutAttribute(string, KeyCode, ShortcutModifiers) | TimelineShortcutAttribute Constructor |