docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TimelineEditor

    Information currently being edited in the Timeline Editor Window.

    Inheritance
    object
    TimelineEditor
    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 TimelineEditor

    Properties

    inspectedAsset

    The TimelineAsset currently being shown in the Timeline window.

    Declaration
    public static TimelineAsset inspectedAsset { get; }
    Property Value
    Type Description
    TimelineAsset

    inspectedDirector

    The PlayableDirector associated with the timeline currently being shown in the Timeline window.

    Declaration
    public static PlayableDirector inspectedDirector { get; }
    Property Value
    Type Description
    PlayableDirector

    masterAsset

    The TimelineAsset at the root of the hierarchy currently being shown in the Timeline window.

    Declaration
    public static TimelineAsset masterAsset { get; }
    Property Value
    Type Description
    TimelineAsset

    masterDirector

    The PlayableDirector responsible for the playback of the timeline currently being shown in the Timeline window.

    Declaration
    public static PlayableDirector masterDirector { get; }
    Property Value
    Type Description
    PlayableDirector

    playableDirector

    The PlayableDirector currently being shown in the Timeline Editor Window.

    Declaration
    [Obsolete("playableDirector is ambiguous. Please select either inspectedDirector or masterDirector instead.", false)]
    public static PlayableDirector playableDirector { get; }
    Property Value
    Type Description
    PlayableDirector

    selectedClip

    The clip selected in the TimelineEditor.

    Declaration
    public static TimelineClip selectedClip { get; set; }
    Property Value
    Type Description
    TimelineClip
    Remarks

    If there are multiple clips selected, this property returns the first clip.

    selectedClips

    The list of clips selected in the TimelineEditor.

    Declaration
    public static TimelineClip[] selectedClips { get; set; }
    Property Value
    Type Description
    TimelineClip[]

    timelineAsset

    The TimelineAsset currently being shown in the Timeline Editor Window.

    Declaration
    [Obsolete("timelineAsset is ambiguous. Please select either inspectedAsset or masterAsset instead.", false)]
    public static TimelineAsset timelineAsset { get; }
    Property Value
    Type Description
    TimelineAsset

    Methods

    GetInspectedTimeFromMasterTime(double)

    Converts time from the master timeline to the current inspected timeline.

    Declaration
    public static double GetInspectedTimeFromMasterTime(double masterTime)
    Parameters
    Type Name Description
    double masterTime

    Time in the referential of the main timeline

    Returns
    Type Description
    double

    Time in the referential of the sub-timeline that is currently show. Returns masterTime if there is no sub-timeline or if no timeline is shown.

    GetMasterTimeFromInspectedTime(double)

    Converts time from the current inspected timeline to the master timeline.

    Declaration
    public static double GetMasterTimeFromInspectedTime(double inspectedTime)
    Parameters
    Type Name Description
    double inspectedTime

    Time in the referential of the sub-timeline

    Returns
    Type Description
    double

    Time in the referential of the main timeline. Returns inspectedTime if there if no timeline is shown.

    GetOrCreateWindow()

    Returns a reference to the Timeline Window. If the window is not opened, it will be opened.

    Declaration
    public static TimelineEditorWindow GetOrCreateWindow()
    Returns
    Type Description
    TimelineEditorWindow

    A reference to the TimelineWindow.

    GetWindow()

    Returns a reference to the Timeline Window.

    Declaration
    public static TimelineEditorWindow GetWindow()
    Returns
    Type Description
    TimelineEditorWindow

    A reference to the TimelineWindow and null if the window is not opened.

    Refresh(RefreshReason)

    Refreshes the different components affected by the currently inspected TimelineAsset, based on the RefreshReason provided.

    For better performance, it is recommended that you invoke this method once, after you modify the TimelineAsset. You should also combine reasons using the | operator.

    Declaration
    public static void Refresh(RefreshReason reason)
    Parameters
    Type Name Description
    RefreshReason reason

    The reason why a refresh should be performed.

    Remarks

    Note: This operation is not synchronous. It is performed during the next GUI loop.

    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)