Method CreateTrack
CreateTrack(Type, TrackAsset, string)
Allows you to create a track and add it to the Timeline.
Declaration
public TrackAsset CreateTrack(Type type, TrackAsset parent, string name)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type of track to create. Must derive from TrackAsset. |
TrackAsset | parent | Track to parent to. This can be null. |
string | name | Name to give the track. |
Returns
Type | Description |
---|---|
TrackAsset | The created track. |
Remarks
This method will throw an InvalidOperationException if the parent is not valid. The parent can be any GroupTrack, or a supported parent type of track. For example, this can be used to create override tracks in AnimationTracks.
CreateTrack<T>(TrackAsset, string)
Creates a track and adds it to the Timeline Asset.
Declaration
public T CreateTrack<T>(TrackAsset parent, string trackName) where T : TrackAsset, new()
Parameters
Type | Name | Description |
---|---|---|
TrackAsset | parent | Track to parent to. This can be null. |
string | trackName | The name of the track being created. |
Returns
Type | Description |
---|---|
T | Returns the created track. |
Type Parameters
Name | Description |
---|---|
T | The type of track being created. The track type must be derived from TrackAsset. |
Remarks
This method will throw an InvalidOperationException if the parent is not valid. The parent can be any GroupTrack, or a supported parent type of track. For example, this can be used to create override tracks in AnimationTracks.
CreateTrack<T>(string)
Creates a track and adds it to the Timeline Asset.
Declaration
public T CreateTrack<T>(string trackName) where T : TrackAsset, new()
Parameters
Type | Name | Description |
---|---|---|
string | trackName | The name of the track being created. |
Returns
Type | Description |
---|---|
T | Returns the created track. |
Type Parameters
Name | Description |
---|---|
T | The type of track being created. The track type must be derived from TrackAsset. |
CreateTrack<T>()
Creates a track and adds it to the Timeline Asset.
Declaration
public T CreateTrack<T>() where T : TrackAsset, new()
Returns
Type | Description |
---|---|
T | Returns the created track. |
Type Parameters
Name | Description |
---|---|
T | The type of track being created. The track type must be derived from TrackAsset. |