TrackEntry Type
Stores settings and other state for the playback of an animation on an AnimationState track.
References to a track entry must not be kept after the !:AnimationStateListener.Dispose(TrackEntry) event occurs.
Constructors
Constructor | Description |
Full Usage:
TrackEntry()
|
|
Instance members
Instance member | Description |
Full Usage:
this.AllowImmediateQueue
|
|
Full Usage:
this.Alpha
|
Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults to 1, which overwrites the skeleton's current pose with this animation. Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to use alpha on track 0 if the skeleton pose is from the last frame render. |
Full Usage:
this.AlphaAttachmentThreshold
|
When TrackEntry.Alpha is greater than |
|
The animation to apply for this track entry.
|
Full Usage:
this.AnimationEnd
|
Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will loop back to TrackEntry.AnimationStart at this time. Defaults to the animation Animation.Duration. |
Full Usage:
this.AnimationLast
|
The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
animation is applied, event timelines will fire all events between the |
Full Usage:
this.AnimationStart
|
Seconds when this animation starts, both initially and after looping. Defaults to 0.
When changing the |
Full Usage:
this.AnimationTime
Returns: float32
|
Uses TrackEntry.TrackTime to compute the
The
|
|
See for details. Usage in C# and spine-unity is explained on the spine-unity documentation pages.
|
Full Usage:
this.Delay
|
Seconds to postpone playing the animation. When this track entry is the current track entry, TrackEntry.TimeScale affects the delay.
When using AnimationState.AddAnimation with a |
|
See for details. Usage in C# and spine-unity is explained on the spine-unity documentation pages.
|
|
See for details. Usage in C# and spine-unity is explained on the spine-unity documentation pages.
|
|
|
Full Usage:
this.EventThreshold
|
When the mix percentage (TrackEntry.MixTime / TrackEntry.MixDuration) is less than the
|
Full Usage:
this.HoldPrevious
|
If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead of being mixed out.
When mixing between animations that key the same property, if a lower track also keys that property then the value will
briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
while the second animation mixes from 0% to 100%. Setting
Snapping will occur if |
|
See for details. Usage in C# and spine-unity is explained on the spine-unity documentation pages.
|
Full Usage:
this.InterruptAlpha
Returns: float32
|
|
Full Usage:
this.IsComplete
Returns: bool
|
Returns true if at least one loop has been completed.
|
Full Usage:
this.IsEmptyAnimation
Returns: bool
|
Returns true if this entry is for the empty animation. See AnimationState.SetEmptyAnimation, AnimationState.AddEmptyAnimation, and AnimationState.SetEmptyAnimations.
|
Full Usage:
this.IsNextReady
Returns: bool
|
Returns true if there is a TrackEntry.Next track entry that will become the current track entry during the next AnimationState.Update.
|
Full Usage:
this.Loop
|
If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its duration. |
Full Usage:
this.MixAttachmentThreshold
|
When the mix percentage (TrackEntry.MixTime / TrackEntry.MixDuration) is less than the
|
Full Usage:
this.MixBlend
|
Controls how properties keyed in the animation are mixed with lower tracks. Defaults to MixBlend.Replace. Track entries on track 0 ignore this setting and always use MixBlend.First.
The |
Full Usage:
this.MixDrawOrderThreshold
|
When the mix percentage (TrackEntry.MixTime / TrackEntry.MixDuration) is less than the
|
Full Usage:
this.MixDuration
|
Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData AnimationStateData.GetMix based on the animation before this animation (if any).
The
When using AnimationState.AddAnimation with a
Alternatively, TrackEntry.SetMixDuration can be used to recompute the delay:
|
Full Usage:
this.MixTime
|
Seconds from 0 to the TrackEntry.MixDuration when mixing from the previous animation to this animation. May be
slightly more than |
|
The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
mixing is currently occurring. When mixing from multiple animations,
|
|
The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
currently occurring. When mixing to multiple animations,
|
|
The animation queued to start after this animation, or null if there is none. See AnimationState.ClearNext to truncate the list.
|
|
The animation queued to play before this animation, or null.
|
Full Usage:
this.Reset
Modifiers: abstract |
|
Full Usage:
this.ResetRotationDirections
|
Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the long way around when using TrackEntry.alpha and starting animations on other tracks. Mixing with MixBlend.Replace involves finding a rotation between two others, which has two possible solutions: the short way or the long way around. The two rotations likely change over time, so which direction is the short or long way also changes. If the short way was always chosen, bones would flip to the other side when that direction became the long way. TrackEntry chooses the short way the first time it is applied and remembers that direction. |
Full Usage:
this.Reverse
|
If true, the animation will be applied in reverse. Events are not fired when an animation is applied in reverse. |
Full Usage:
this.SetMixDuration
Parameters:
float32
delay : float32
-
If > 0, sets TrackEntry.Delay. If <= 0, the delay set is the duration of the previous track
entry minus the specified mix duration plus the specified delay (ie the mix ends at
(delay = 0) or before (delay < 0) the previous track entry duration). If the previous
entry is looping, its next loop completion is used instead of its duration.
|
|
Full Usage:
this.ShortestRotation
|
If true, mixing rotation between tracks always uses the shortest rotation direction. If the rotation is animated, the shortest rotation direction may change during the mix. If false, the shortest rotation direction is remembered when the mix starts and the same direction is used for the rest of the mix. Defaults to false. |
|
See for details. Usage in C# and spine-unity is explained on the spine-unity documentation pages.
|
Full Usage:
this.TimeScale
|
Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or faster. Defaults to 1. Values < 0 are not supported. To play an animation in reverse, use TrackEntry.Reverse. TrackEntry.MixTime is not affected by track entry time scale, so TrackEntry.MixDuration may need to be adjusted to match the animation speed.
When using AnimationState.AddAnimation with a See AnimationState AnimationState.TimeScale for affecting all animations. |
Full Usage:
this.ToString
Returns: string
Modifiers: abstract |
|
Full Usage:
this.TrackComplete
Returns: float32
|
If this track entry is non-looping, the track time in seconds when TrackEntry.AnimationEnd is reached, or the current TrackEntry.TrackTime if it has already been reached. If this track entry is looping, the track time when this animation will reach its next TrackEntry.AnimationEnd (the next loop completion).
|
Full Usage:
this.TrackEnd
|
The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the properties keyed by the animation are set to the setup pose and the track is cleared. It may be desired to use AnimationState.AddEmptyAnimation rather than have the animation abruptly cease being applied. |
Full Usage:
this.TrackIndex
Returns: int
|
The index of the track where this entry is either current or queued.
|
Full Usage:
this.TrackTime
|
Current time in seconds this track entry has been the current track entry. The track time determines TrackEntry.AnimationTime. The track time can be set to start the animation at a time other than 0, without affecting looping. |
Full Usage:
this.WasApplied
Returns: bool
|
Returns true if this track entry has been applied at least once.
|