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.
Inherited Members
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
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
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
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
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
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
UnParentClip()
Also nullify the editorialClip.
Declaration
protected override void UnParentClip()