using System;
namespace UnityEditor.Timeline.Actions
{
///
/// Use this attribute on action classes (,
/// ,
/// and
/// )
/// to have the default undo behaviour applied.
///
/// By default, applying this attribute will record all objects passed to the Execute method with the Undo system,
/// using the name of Action it is applied to.
///
///
/// Simple track Action example (with context menu and shortcut support).
///
///
///
///
///
///
///
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public class ApplyDefaultUndoAttribute : Attribute
{
///
/// The title of the action to appear in the undo history. If not specified, the name is taken from the DisplayName attribute,
/// or derived from the name of the class this attribute is applied to.
///
public string UndoTitle;
/// Use this attribute on action classes to have the default undo behaviour applied.
///
/// The title of the action to appear in the undo history.
public ApplyDefaultUndoAttribute(string undoTitle = null)
{
UndoTitle = undoTitle;
}
}
}