docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class UndoExtensions

    Provides methods that record the state of a timeline, and its components, prior to modification.

    Inheritance
    object
    UndoExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Timeline
    Assembly: Unity.Timeline.Editor.dll
    Syntax
    public static class UndoExtensions
    Remarks

    The methods in this class are not required when adding or deleting tracks, clips, or markers. Use methods in the UnityEngine.Timeline namespace, such as CreateTrack(Type, TrackAsset, string) or CreateDefaultClip(), to apply the appropriate Undo calls when using the Editor.

    Methods

    RegisterClip(TimelineClip, string, bool)

    Records changes to a clip.

    Declaration
    public static void RegisterClip(TimelineClip clip, string undoTitle, bool includePlayableAsset = true)
    Parameters
    Type Name Description
    TimelineClip clip

    The timeline clip being modified.

    string undoTitle

    The title of the action that appears in the undo history. For example, this title is shown in the Undo menu.

    bool includePlayableAsset

    Set this value to true to record changes to the attached playable asset.

    RegisterClips(IEnumerable<TimelineClip>, string, bool)

    Records changes to clips.

    Declaration
    public static void RegisterClips(IEnumerable<TimelineClip> clips, string name, bool includePlayableAssets = true)
    Parameters
    Type Name Description
    IEnumerable<TimelineClip> clips

    The timeline clips being modified.

    string name

    The title of the action that appears in the undo history. For example, this title is shown in the Undo menu.

    bool includePlayableAssets

    Set this value to true to also record changes to attached playable assets.

    RegisterCompleteTimeline(TimelineAsset, string)

    Records all timeline changes including changes to tracks, clips, and markers.

    Declaration
    public static void RegisterCompleteTimeline(TimelineAsset asset, string undoTitle)
    Parameters
    Type Name Description
    TimelineAsset asset

    The timeline asset being modified.

    string undoTitle

    The title of the action that appears in the undo history. For example, this title is shown in the Undo menu.

    RegisterContext(ActionContext, string)

    Records changes to all items contained in an action context.

    Declaration
    public static void RegisterContext(ActionContext context, string undoTitle)
    Parameters
    Type Name Description
    ActionContext context

    The action context to record into the Undo system.

    string undoTitle

    The title of the action that appears in the undo history. For example, this title is shown in the Undo menu.

    RegisterMarker(IMarker, string)

    Records changes to a timeline marker.

    Declaration
    public static void RegisterMarker(IMarker marker, string undoTitle)
    Parameters
    Type Name Description
    IMarker marker

    The timeline marker being modified.

    string undoTitle

    The title of the action that appears in the undo history. For example, this title is shown in the Undo menu.

    RegisterMarkers(IEnumerable<IMarker>, string)

    Records changes to timeline markers.

    Declaration
    public static void RegisterMarkers(IEnumerable<IMarker> markers, string undoTitle)
    Parameters
    Type Name Description
    IEnumerable<IMarker> markers

    The timeline markers being modified.

    string undoTitle

    The title of the action that appears in the undo history. For example, this title is shown in the Undo menu.

    RegisterPlayableAsset(PlayableAsset, string)

    Records changes to a PlayableAsset.

    Declaration
    public static void RegisterPlayableAsset(PlayableAsset asset, string undoTitle)
    Parameters
    Type Name Description
    PlayableAsset asset

    The PlayableAsset being modified.

    string undoTitle

    The title of the action that appears in the undo history. For example, this title is shown in the Undo menu.

    RegisterTimeline(TimelineAsset, string)

    Records changes to timeline asset properties. This method does not record changes to tracks or clips.

    Declaration
    public static void RegisterTimeline(TimelineAsset asset, string undoTitle)
    Parameters
    Type Name Description
    TimelineAsset asset

    The timeline asset being modified.

    string undoTitle

    The title of the action that appears in the undo history. For example, this title is shown in the Undo menu.

    RegisterTrack(TrackAsset, string)

    Records changes to tracks and clips but not to markers nor PlayableAssets attached to clips.

    Declaration
    public static void RegisterTrack(TrackAsset asset, string undoTitle)
    Parameters
    Type Name Description
    TrackAsset asset

    The timeline track being modified.

    string undoTitle

    The title of the action that appears in the undo history. For example, this title is shown in the Undo menu.

    RegisterTracks(IEnumerable<TrackAsset>, string)

    Records changes to tracks. This includes changes to clips on these tracks, but not changes to markers nor PlayableAssets attached to clips.

    Declaration
    public static void RegisterTracks(IEnumerable<TrackAsset> tracks, string undoTitle)
    Parameters
    Type Name Description
    IEnumerable<TrackAsset> tracks

    The timeline track being modified.

    string undoTitle

    The title of the action that appears in the undo history. For example, this title is shown in the Undo menu.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)