docs.unity3d.com
    Show / Hide Table of Contents

    Class TimelineSequence

    A TimelineSequence is a Sequence object associated with a TimelineAsset. This is the main object used in the MasterSequence asset to define an editorial hierarchy of sequences.

    Inheritance
    Object
    Sequence
    TimelineSequence
    Inherited Members
    Sequence.m_Name
    Sequence.m_Fps
    Sequence.m_Start
    Sequence.m_Duration
    Sequence.sequenceRenamed
    Sequence.isFpsInherited
    Sequence.end
    Sequence.Move(Double)
    Sequence.SetDuration(Double)
    Sequence.parent
    Sequence.hasChildren
    Sequence.children
    Sequence.AddChild(Sequence)
    Sequence.RemoveChild(Sequence)
    Sequence.ParentClip(Sequence)
    Namespace: UnityEngine.Sequences
    Syntax
    public class TimelineSequence : Sequence

    Properties

    childrenTrack

    Get the Sequence EditorialTrack that contains children clips. It can be null.

    Declaration
    public EditorialTrack childrenTrack { get; }
    Property Value
    Type Description
    EditorialTrack

    childrenTrackName

    Get or set the Sequence children track name. e.g.: Common name for children tracks are "Sequences" or "Shots".

    Declaration
    public string childrenTrackName { get; set; }
    Property Value
    Type Description
    String

    duration

    Get or set the TimelineSequence duration. The duration is based on its editorialClip.duration value when editorialClip exists.

    Declaration
    public override double duration { get; set; }
    Property Value
    Type Description
    Double
    Overrides
    Sequence.duration

    editorialClip

    Gets the Sequence editorial TimelineClip. This is the clip that belongs to the parent childrenTrack and point to the timeline of this Sequence.

    Declaration
    public TimelineClip editorialClip { get; }
    Property Value
    Type Description
    TimelineClip

    fps

    Indicates the framerate of the Sequence. The framerate is retrieved from the Timeline asset when possible.

    Declaration
    public override float fps { get; set; }
    Property Value
    Type Description
    Single
    Overrides
    Sequence.fps

    name

    Indicates the name of the Sequence. Changing the name of a TimelineSequence also changes the name of the timeline and the editorialClip (if it exists).

    Declaration
    public override string name { set; }
    Property Value
    Type Description
    String
    Overrides
    Sequence.name
    Remarks

    When setting a new name, sequenceRenamed event is triggered.

    start

    Get or set the TimelineSequence start time. The start time is based on its editorialClip.start value when editorialClip exists.

    Declaration
    public override double start { get; set; }
    Property Value
    Type Description
    Double
    Overrides
    Sequence.start

    timeline

    Gets the Sequence timeline.

    Declaration
    public TimelineAsset timeline { get; }
    Property Value
    Type Description
    TimelineAsset

    Methods

    AddChildClip(Sequence)

    Adds the specified Sequence as a child of this Sequence and creates the childrenTrack if it doesn't already exist. The editorialClip of the added clip is also created in the childrenTrack. If the given clip is not a TimelineSequence, no track or clip are created.

    This function is used by AddChild(Sequence) and the parent setter.

    Declaration
    protected override double AddChildClip(Sequence childClip)
    Parameters
    Type Name Description
    Sequence childClip

    The child Sequence to add.

    Returns
    Type Description
    Double

    The actual start time of the added clip.

    Overrides
    Sequence.AddChildClip(Sequence)

    GetRelatedScenes()

    Gets all the scenes needed to have the scene context for this clip complete. This includes all upstream, downstream scenes and the scenes of the clip itself.

    Declaration
    public IReadOnlyCollection<string> GetRelatedScenes()
    Returns
    Type Description
    IReadOnlyCollection<String>

    A collection of Scene paths.

    Remarks

    The returned paths are ordered from upstream to downstream.

    RemoveChildClip(Sequence)

    On top of removing the given Sequence from children, its editorialClip is removed from the childrenTrack. If the childrenTrack end up empty, it is removed as well. If the given clip is not a TimelineSequence, no track or clip are deleted. RemoveChild(Sequence) parent

    Declaration
    protected override void RemoveChildClip(Sequence childClip)
    Parameters
    Type Name Description
    Sequence childClip

    The child Sequence to remove.

    Overrides
    Sequence.RemoveChildClip(Sequence)

    UnParentClip()

    Also nullify the editorialClip.

    Declaration
    protected override void UnParentClip()
    Overrides
    Sequence.UnParentClip()

    Extension Methods

    TimelineSequenceExtensions.Save(TimelineSequence, String)
    TimelineSequenceExtensions.Rename(TimelineSequence, String)
    TimelineSequenceExtensions.Delete(TimelineSequence)
    TimelineSequenceExtensions.Record(TimelineSequence, Boolean)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023