Class SequenceUtility
Utility functions to manipulate MasterSequence assets and Sequence objects.
Namespace: UnityEditor.Sequences
Syntax
public static class SequenceUtility : object
Methods
CreateMasterSequence(String, Single)
Creates a new MasterSequence and saves it on disk.
Declaration
public static MasterSequence CreateMasterSequence(string name, float fps = null)
Parameters
Type | Name | Description |
---|---|---|
String | name | The created MasterSequence name. |
Single | fps | The created MasterSequence frame rate. If you don't specify a framerate, the MasterSequence uses by default the Timeline framerate value from the Project Settings. |
Returns
Type | Description |
---|---|
MasterSequence | The newly created MasterSequence asset. |
CreateSequence(String, MasterSequence, TimelineSequence)
Creates a new Sequence in the specified MasterSequence asset. Also saves the Sequence TimelineAsset and the updated MasterSequence on disk.
Declaration
public static TimelineSequence CreateSequence(string name, MasterSequence masterSequence, TimelineSequence parent = null)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the created Sequence. |
MasterSequence | masterSequence | The MasterSequence asset to add the created Sequence to. |
TimelineSequence | parent | An optional parent Sequence for the created one. |
Returns
Type | Description |
---|---|
TimelineSequence | The newly created TimelineSequence. |
DeleteSequence(TimelineSequence, MasterSequence)
Removes the specified Sequence and all its sub-Sequences from the specified MasterSequence asset. This also removes from disk each corresponding Sequence TimelineAsset, and saves the updated MasterSequence asset.
Declaration
public static void DeleteSequence(TimelineSequence sequence, MasterSequence masterSequence)
Parameters
Type | Name | Description |
---|---|---|
TimelineSequence | sequence | The Sequence to delete. |
MasterSequence | masterSequence | The MasterSequence to remove the Sequence from. |
Events
sequenceCreated
Each TimelineSequence creation on disk triggers this event.
Declaration
public static event Action<TimelineSequence, MasterSequence> sequenceCreated
Event Type
Type | Description |
---|---|
Action<TimelineSequence, MasterSequence> |
sequenceDeleted
Each TimelineSequence deletion from disk triggers this event.
Declaration
public static event Action sequenceDeleted
Event Type
Type | Description |
---|---|
Action |