C# Класс UnityEngine.Timeline.TrackAsset

Наследование: PlayableAsset, ISerializationCallbackReceiver, IPropertyPreview
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddChild void
AddClip void
AddMarker void
CanCompileClips bool
CanCompileClipsRecursive bool
CanCompileNotifications bool
ClearClipsInternal void
ClearMarkers void
ClearSubTracksInternal void
CompileClips Playable
ConfigureTrackAnimation void
CreateAndAddNewClipOfType UnityEngine.Timeline.TimelineClip
CreateClip UnityEngine.Timeline.TimelineClip
CreateClipFromAsset UnityEngine.Timeline.TimelineClip
CreateClipFromPlayableAsset UnityEngine.Timeline.TimelineClip
CreateClipOfType UnityEngine.Timeline.TimelineClip
CreateNewClipContainerInternal UnityEngine.Timeline.TimelineClip
CreateNotificationsPlayable Playable
CreatePlayableGraph Playable
DeleteMarkerRaw bool
GatherCompilableTracks void
GatherNotificiations void
GetClipsHash int
GetEvaluationTime void
GetGameObjectBinding GameObject
GetMarkersRaw IEnumerable
GetNotificationDuration double
GetSequenceTime void
GetTimeRangeHash int
HasNotifications bool
Hash int
Invalidate void
IsCompilable bool
MarkDirty void
MoveLastTrackBefore void
OnClipMove void
OnCreateClipPlayableGraph Playable
RemoveClip void
RemoveSubTrack bool
SortClips void
UpdateChildTrackCache void
UpdateDuration void
ValidateClipType bool
__internalAwake void

Открытые методы

Метод Описание
CreateClip ( ) : UnityEngine.Timeline.TimelineClip

Creates a clip on the track with a playable asset attached, whose derived type is specified by T

Throws an InvalidOperationException if the specified type is not supported by the track. Supported types are determined by TrackClip attributes that decorate the TrackAsset derived class

CreateCurves ( string curvesClipName ) : void

Creates an AnimationClip to store animated properties for the attached PlayableAsset.

If curves already exists for this track, this method produces no result regardless of the value specified for curvesClipName.When used from the editor, this method attempts to save the created curves clip to the TimelineAsset. The TimelineAsset must already exist in the AssetDatabase to save the curves clip. If the TimelineAsset does not exist, the curves clip is still created but it is not saved.

CreateDefaultClip ( ) : UnityEngine.Timeline.TimelineClip

Creates a TimelineClip on this track.

The type of the playable asset attached to the clip is determined by TrackClip attributes that decorate the TrackAsset derived class

CreateMarker ( Type type, double time ) : IMarker

Creates a marker of the requested type, at a specific time, and adds the marker to the current asset.

All markers that implement IMarker and inherit from UnityEngine.ScriptableObject are supported. Markers that implement the INotification interface cannot be added to tracks that do not support notifications. CreateMarker will throw an InvalidOperationException with tracks that do not support notifications if type implements the INotification interface.

CreateMarker ( double time ) : T

Creates a marker of the requested type, at a specific time, and adds the marker to the current asset.

All markers that implement IMarker and inherit from UnityEngine.ScriptableObject are supported. CreateMarker will throw an InvalidOperationException with tracks that do not support notifications if T implements the INotification interface.

CreatePlayable ( PlayableGraph graph, GameObject go ) : Playable

Overrides PlayableAsset.CreatePlayable(). Not used in Timeline.

CreateTrackMixer ( PlayableGraph graph, GameObject go, int inputCount ) : Playable

Creates a mixer used to blend playables generated by clips on the track.

Override this method to provide a custom playable for mixing clips on a graph.

DeleteMarker ( IMarker marker ) : bool

Removes a marker from the current asset.

GatherProperties ( PlayableDirector director, IPropertyCollector driver ) : void

Called by the Timeline Editor to gather properties requiring preview.

GetChildTracks ( ) : IEnumerable

The list of subtracks or child tracks attached to this track.

In the case of GroupTracks, this returns all tracks contained in the group. This will return the all subtracks or override tracks, if supported by the track.

GetClips ( ) : IEnumerable

A list of clips owned by this track

GetMarker ( int idx ) : IMarker

Returns the marker at a given position, on the current asset.

The ordering of the markers is not guaranteed.

GetMarkerCount ( ) : int

Returns the number of markers on the current asset.

GetMarkers ( ) : IEnumerable

Returns an enumerable list of markers on the current asset.

Защищенные методы

Метод Описание
CalculateItemsHash ( ) : int
CreatePlayable ( PlayableGraph graph, GameObject gameObject, UnityEngine.Timeline.TimelineClip clip ) : Playable

Constructs a Playable from a TimelineClip.

By default, this method invokes Playable.CreatePlayable, sets animated properties, and sets the speed of the created playable. Override this method to change this default implementation.

GetAnimationClipHash ( AnimationClip clip ) : int
OnCreateClip ( UnityEngine.Timeline.TimelineClip clip ) : void

Called when a clip is created on a track.

Use this method to set default values on a timeline clip, or it's PlayableAsset.

Приватные методы

Метод Описание
AddChild ( TrackAsset child ) : void
AddClip ( UnityEngine.Timeline.TimelineClip newClip ) : void
AddMarker ( ScriptableObject e ) : void
CanCompileClips ( ) : bool
CanCompileClipsRecursive ( ) : bool
CanCompileNotifications ( ) : bool
ClearClipsInternal ( ) : void
ClearMarkers ( ) : void
ClearSubTracksInternal ( ) : void
CompileClips ( PlayableGraph graph, GameObject go, IList timelineClips, UnityEngine.Timeline.IntervalTree tree ) : Playable
ConfigureTrackAnimation ( UnityEngine.Timeline.IntervalTree tree, GameObject go, Playable blend ) : void
CreateAndAddNewClipOfType ( Type requestedType ) : UnityEngine.Timeline.TimelineClip
CreateClip ( Type requestedType ) : UnityEngine.Timeline.TimelineClip
CreateClipFromAsset ( ScriptableObject playableAsset ) : UnityEngine.Timeline.TimelineClip
CreateClipFromPlayableAsset ( IPlayableAsset asset ) : UnityEngine.Timeline.TimelineClip

Creates a timeline clip from an existing playable asset.

CreateClipOfType ( Type requestedType ) : UnityEngine.Timeline.TimelineClip
CreateNewClipContainerInternal ( ) : UnityEngine.Timeline.TimelineClip
CreateNotificationsPlayable ( PlayableGraph graph, Playable mixerPlayable, GameObject go, Playable timelinePlayable ) : Playable
CreatePlayableGraph ( PlayableGraph graph, GameObject go, UnityEngine.Timeline.IntervalTree tree, Playable timelinePlayable ) : Playable
DeleteMarkerRaw ( ScriptableObject marker ) : bool
GatherCompilableTracks ( IList tracks ) : void
GatherNotificiations ( List markers ) : void
GetClipsHash ( ) : int
GetEvaluationTime ( double &outStart, double &outDuration ) : void
GetGameObjectBinding ( PlayableDirector director ) : GameObject
GetMarkersRaw ( ) : IEnumerable
GetNotificationDuration ( ) : double
GetSequenceTime ( double &outStart, double &outDuration ) : void
GetTimeRangeHash ( ) : int
HasNotifications ( ) : bool
Hash ( ) : int
Invalidate ( ) : void
IsCompilable ( ) : bool
MarkDirty ( ) : void
MoveLastTrackBefore ( TrackAsset asset ) : void
OnClipMove ( ) : void
OnCreateClipPlayableGraph ( PlayableGraph graph, GameObject go, UnityEngine.Timeline.IntervalTree tree ) : Playable
RemoveClip ( UnityEngine.Timeline.TimelineClip clip ) : void
RemoveSubTrack ( TrackAsset child ) : bool
SortClips ( ) : void
UpdateChildTrackCache ( ) : void
UpdateDuration ( ) : void
ValidateClipType ( Type clipType ) : bool
__internalAwake ( ) : void

Описание методов

CalculateItemsHash() защищенный Метод

protected CalculateItemsHash ( ) : int
Результат int

CreateClip() публичный Метод

Creates a clip on the track with a playable asset attached, whose derived type is specified by T
Throws an InvalidOperationException if the specified type is not supported by the track. Supported types are determined by TrackClip attributes that decorate the TrackAsset derived class
public CreateClip ( ) : UnityEngine.Timeline.TimelineClip
Результат UnityEngine.Timeline.TimelineClip

CreateCurves() публичный Метод

Creates an AnimationClip to store animated properties for the attached PlayableAsset.
If curves already exists for this track, this method produces no result regardless of the value specified for curvesClipName. When used from the editor, this method attempts to save the created curves clip to the TimelineAsset. The TimelineAsset must already exist in the AssetDatabase to save the curves clip. If the TimelineAsset does not exist, the curves clip is still created but it is not saved.
public CreateCurves ( string curvesClipName ) : void
curvesClipName string /// The name of the AnimationClip to create. /// This method does not ensure unique names. If you want a unique clip name, you must provide one. /// See ObjectNames.GetUniqueName for information on a method that creates unique names. ///
Результат void

CreateDefaultClip() публичный Метод

Creates a TimelineClip on this track.
The type of the playable asset attached to the clip is determined by TrackClip attributes that decorate the TrackAsset derived class
public CreateDefaultClip ( ) : UnityEngine.Timeline.TimelineClip
Результат UnityEngine.Timeline.TimelineClip

CreateMarker() публичный Метод

Creates a marker of the requested type, at a specific time, and adds the marker to the current asset.
All markers that implement IMarker and inherit from UnityEngine.ScriptableObject are supported. Markers that implement the INotification interface cannot be added to tracks that do not support notifications. CreateMarker will throw an InvalidOperationException with tracks that do not support notifications if type implements the INotification interface.
public CreateMarker ( Type type, double time ) : IMarker
type Type The type of marker.
time double The time where the marker is created.
Результат IMarker

CreateMarker() публичный Метод

Creates a marker of the requested type, at a specific time, and adds the marker to the current asset.
All markers that implement IMarker and inherit from UnityEngine.ScriptableObject are supported. CreateMarker will throw an InvalidOperationException with tracks that do not support notifications if T implements the INotification interface.
public CreateMarker ( double time ) : T
time double The time where the marker is created.
Результат T

CreatePlayable() публичный закрытый Метод

Overrides PlayableAsset.CreatePlayable(). Not used in Timeline.
public final CreatePlayable ( PlayableGraph graph, GameObject go ) : Playable
graph PlayableGraph
go GameObject
Результат Playable

CreatePlayable() защищенный Метод

Constructs a Playable from a TimelineClip.
By default, this method invokes Playable.CreatePlayable, sets animated properties, and sets the speed of the created playable. Override this method to change this default implementation.
Thrown if the specified PlayableGraph is not valid. Thrown if the specified TimelineClip is not valid.
protected CreatePlayable ( PlayableGraph graph, GameObject gameObject, UnityEngine.Timeline.TimelineClip clip ) : Playable
graph PlayableGraph PlayableGraph that will own the playable.
gameObject GameObject The GameObject that builds the PlayableGraph.
clip UnityEngine.Timeline.TimelineClip The TimelineClip to construct a playable for.
Результат Playable

CreateTrackMixer() публичный Метод

Creates a mixer used to blend playables generated by clips on the track.
Override this method to provide a custom playable for mixing clips on a graph.
public CreateTrackMixer ( PlayableGraph graph, GameObject go, int inputCount ) : Playable
graph PlayableGraph The graph to inject playables into
go GameObject The GameObject that requested the graph.
inputCount int The number of playables from clips that will be inputs to the returned mixer
Результат Playable

DeleteMarker() публичный Метод

Removes a marker from the current asset.
public DeleteMarker ( IMarker marker ) : bool
marker IMarker The marker instance to be removed.
Результат bool

GatherProperties() публичный Метод

Called by the Timeline Editor to gather properties requiring preview.
public GatherProperties ( PlayableDirector director, IPropertyCollector driver ) : void
director PlayableDirector The PlayableDirector invoking the preview
driver IPropertyCollector PropertyCollector used to gather previewable properties
Результат void

GetAnimationClipHash() защищенный статический Метод

protected static GetAnimationClipHash ( AnimationClip clip ) : int
clip AnimationClip
Результат int

GetChildTracks() публичный Метод

The list of subtracks or child tracks attached to this track.
In the case of GroupTracks, this returns all tracks contained in the group. This will return the all subtracks or override tracks, if supported by the track.
public GetChildTracks ( ) : IEnumerable
Результат IEnumerable

GetClips() публичный Метод

A list of clips owned by this track
public GetClips ( ) : IEnumerable
Результат IEnumerable

GetMarker() публичный Метод

Returns the marker at a given position, on the current asset.
The ordering of the markers is not guaranteed.
public GetMarker ( int idx ) : IMarker
idx int The index of the marker to be returned.
Результат IMarker

GetMarkerCount() публичный Метод

Returns the number of markers on the current asset.
public GetMarkerCount ( ) : int
Результат int

GetMarkers() публичный Метод

Returns an enumerable list of markers on the current asset.
public GetMarkers ( ) : IEnumerable
Результат IEnumerable

OnCreateClip() защищенный Метод

Called when a clip is created on a track.
Use this method to set default values on a timeline clip, or it's PlayableAsset.
protected OnCreateClip ( UnityEngine.Timeline.TimelineClip clip ) : void
clip UnityEngine.Timeline.TimelineClip The timeline clip added to this track
Результат void