public abstract Validate ( UnityEditor.Timeline.Actions.ActionContext context ) : ActionValidity | ||
context | UnityEditor.Timeline.Actions.ActionContext | Context for the action. |
Résultat | ActionValidity |
public static bool ExecuteTimelineAction(TimelineAction timelineAction, ActionContext context) { if (timelineAction.Validate(context) == ActionValidity.Valid) { if (timelineAction.HasAutoUndo()) { UndoExtensions.RegisterContext(context, timelineAction.GetUndoName()); } return(timelineAction.Execute(context)); } return(false); }
static void BuildMenu(TimelineAction action, ActionContext context, List <MenuActionItem> menuItems, MenuFilter filter) { BuildMenu(action, action.Validate(context), () => ExecuteTimelineAction(action, context), menuItems, filter); }